Sarun Intaralawan Sarun Intaralawan - 1 year ago 120
Ruby Question

Update local gem source code

I'm testing a gem in a Rails project.

The current Gemfile:

gem 'mygemname', path: '/path/to/my/gem'

When I edit a gem locally I can build the gem, remove the gem from
, run
bundle install
, add the gem back to the Gemfile and run
bundle install
again. Is there an easier way to do this locally?

Answer Source

If you use bundle config local.GEM_NAME /path/to/local/git/repository from the command line then every time you reload your application it will load the latest source from your file system.

To remove the changes (when you have pushed your code to GitHub or RubyGems), you need to run bundle config --delete local.GEM_NAME


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download