Developing gems and using them in rails projects with bundler, is there a faster way?
I'm writing a gem for a Rails project and committing changes to its git repository. The Rails project refers to it in the Gemfile.
gem "blah", :git => "blah", :branch => "developmen开发者_开发百科t"
The problem is one of patience. Every time I commit changes to the gem, I have to run "bundle update" (or at least bundle update blah
) to be able to use the gem, which takes a while. Is there a way of bypassing the bundle update step and using the latest version of the gem whenever I restart my Rails app?
First:
Use a path:
gem "blah", :path => "~/Code/blah"
Second (to answer Zabba's question-as-a-comment): No it's currently not possible to automatically reload your gems in development mode. You must restart your server each time you change your gem.
A better way would be to generate your gem with a dummy application included in its test suite and test against that.
精彩评论