Hello, I would like to exactly know how rubygems-bundler and bundler make difference in Rails applications. I am using RVM to manage different Ruby versions and ruby gems. When I have a look into @global gemset for each ruby version, I can see four gems have been by default installed. (rvm, rubygems-bundler, bundler and rake). I am confused by Rubygems, bundler and rubygems-bundler. Can anyone kindly walk me through the differences between them? Thanks in advance. Christopher -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Sunday, March 17, 2013 5:59:34 PM UTC, Ruby-Forum.com User wrote:> > Hello, > > I would like to exactly know how rubygems-bundler and bundler make > difference in Rails applications. > I am using RVM to manage different Ruby versions and ruby gems. > When I have a look into @global gemset for each ruby version, I can see > four gems have been by default installed. (rvm, rubygems-bundler, > bundler and rake). > > I am confused by Rubygems, bundler and rubygems-bundler. > Can anyone kindly walk me through the differences between them? > > rubygems is the now standard way of packaging and distributing rubylibraries. bundler is a gem to handle dependency management. It also solves dependency mismatch problems that used to occur. Say for example that your app uses the foo gem (any version) and the bar gem. The bar gem is only compatible with foo 1.x, but you have foo 1.x and 2.0 installed. If your app loads the foo gem first then the defaut will be the latest version (2.0), but this will then prevent you loading the bar gem, because it can only use foo 1.x and you can''t load 2 versions of the same gem. Of course if your app had loaded foo 1.x instead everything would be fine but before bundler there was no easy way of managing this . bundler also helps ensure that everyone working on a project is using the same versions of the gems (including your production development, makes it easy to install all an app''s dependencies in one go and makes it very easy to install gems straight from their git repo. A minor annoyance with bundler is that it means that you might run into problems running (for example) rake: this would load the most recent version of rake, which might clash with the version you have asked bundler to use, or rake might load a gem that clashes with something else in your app. You can use `bundle exec rake` to load bundler first and ensure that these problems don''t happen, but it gets a bit annoying to have to type that extra preamble everytime. rubygems-bundler aims to make that unnecessary. Fred> Thanks in advance. > Christopher > > -- > Posted via http://www.ruby-forum.com/. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/GOyMmGyFQaYJ. For more options, visit https://groups.google.com/groups/opt_out.
> You can use `bundle exec rake` to load bundler first and ensure > that > these problems don''t happen, but it gets a bit annoying to have to type > that extra preamble everytime. rubygems-bundler aims to make that > unnecessary. > > FredThank you so much, Fred, for your explanation. I got clear on Rubygems and bundler. But I am not still able to get the handle of rubygems-bundler and rubygems-update. I am using RVM and it normally activated Rake 0.9.2.2. If my current gemset is dependent upon Rake 0.8.7, I still have to type bundle exec rake ... to use rake 0.8.7 even if I have ruygems-bundler 1.0.0 gem. It can be thought that rubygems-bundler is not working as expected in the RVM environment? Regards, Christopher -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Monday, March 18, 2013 2:39:45 AM UTC, Ruby-Forum.com User wrote:> > Thank you so much, Fred, for your explanation. > I got clear on Rubygems and bundler. > But I am not still able to get the handle of rubygems-bundler and > rubygems-update. >rubygems-update is a way of distributing update to rubygems itself as a gem.> I am using RVM and it normally activated Rake 0.9.2.2. > If my current gemset is dependent upon Rake 0.8.7, I still have to type > bundle exec rake ... to use rake 0.8.7 even if I have ruygems-bundler > 1.0.0 gem. > It can be thought that rubygems-bundler is not working as expected in > the RVM environment? > > I''ve not use rubygems-bundler before - not sure what its constraints are.Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/JYXfyWq20IAJ. For more options, visit https://groups.google.com/groups/opt_out.
run `gem regenerate_binstubs` - it will refresh all the binaries in rubygems to use rubygems-bundler, it''s usually done by default when you install gem. On Monday, March 18, 2013 11:13:59 AM UTC+1, Frederick Cheung wrote:> > On Monday, March 18, 2013 2:39:45 AM UTC, Ruby-Forum.com User wrote: >> >> Thank you so much, Fred, for your explanation. >> I got clear on Rubygems and bundler. >> But I am not still able to get the handle of rubygems-bundler and >> rubygems-update. >> > > rubygems-update is a way of distributing update to rubygems itself as a > gem. > > >> I am using RVM and it normally activated Rake 0.9.2.2. >> If my current gemset is dependent upon Rake 0.8.7, I still have to type >> bundle exec rake ... to use rake 0.8.7 even if I have ruygems-bundler >> 1.0.0 gem. >> It can be thought that rubygems-bundler is not working as expected in >> the RVM environment? >> >> I''ve not use rubygems-bundler before - not sure what its constraints are. > > Fred >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/gQ0g6hL_sQMJ. For more options, visit https://groups.google.com/groups/opt_out.