If I have a gem locally that I change without updating the version number the bundler never seems to notice. I have a gem fx ''devise-assistant'' version 0.1.0. If I add a single method and run ''rake install'' and then ''bundle install'' in my Rails app, then bundler seems to think the gem has not been ''touched'' (since no version change?) and hence my Rails app uses the old "cached" gem (NoMethodError). Would be nice with a new bundler task, which forces a certain gem (gems or all gems!) to be resolved anew. $ bundler update GEM $ bundler update devise-assistant $ bundler update gem1 gem2 gem3 $ bundler update-all or maybe $ bundler install --force-update devise-assistant Right now I have two options. Either do the version bump on the gem, then ''bundle install'' or ... remove from Gemfile, run ''bundle install'' reinsert in gemfile, run ''bundle install''. Yikes! Maybe I should make a batch script or thor task to facilitate this hack :P haha! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On Apr 19, 2010, at 6:24 PM, Kristian Mandrup wrote:> If I have a gem locally that I change without updating the version > number the bundler never seems to notice.Don''t do this. Seriously. Long-term, it''s a one-way ticket to dependency hell. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Mislav Marohnić
2010-Apr-19 22:42 UTC
Re: Bundler caching issues when updating gem locally
First of all, this is not a list to discuss Bundler features or development. Ask on #carlhuda Freenode channel. But now that you''re here, I can give you advice: bundling versioned gems is only meant for libraries that are not in active development at this moment. For libraries that you current work on locally, there is the "path" option which tells Bundler "add the gem/library under this path to load paths". Perfect for development, and when you release a (relatively) stable version which you want to share, switch back to `gem` method with version specification. Bump up the version after each cycle. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
On Mon, Apr 19, 2010 at 3:30 PM, Matt Jones <al2o3cr@gmail.com> wrote:> On Apr 19, 2010, at 6:24 PM, Kristian Mandrup wrote: > >> If I have a gem locally that I change without updating the version >> number the bundler never seems to notice. > > Don''t do this. Seriously. Long-term, it''s a one-way ticket to dependency > hell.Correct. Just append a timestamp as the last version element in your local environment (and on every non-release or automated build) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Kristian Mandrup
2010-Apr-24 12:48 UTC
Re: Bundler caching issues when updating gem locally
Thank you so much! Just what I was looking for. I knew there had to be a way... It doesn''t seem like the :path option is mentioned much however. On Apr 19, 6:42 pm, Mislav Marohnić <mislav.maroh...@gmail.com> wrote:> First of all, this is not a list to discuss Bundler features or development. > Ask on #carlhuda Freenode channel. > > But now that you''re here, I can give you advice: bundling versioned gems is > only meant for libraries that are not in active development at this moment. > For libraries that you current work on locally, there is the "path" option > which tells Bundler "add the gem/library under this path to load paths". > Perfect for development, and when you release a (relatively) stable version > which you want to share, switch back to `gem` method with version > specification. Bump up the version after each cycle. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.