Last Updated: February 25, 2016
·
733
· jcmuller

Ruby development using local gems

Bundler introduced a few months ago the concept of local gems. Not hard coding the local path in your Gemfile, but just overriding the location. This works really well, and we've been using it ever since.

The syntax? bundle config local.GEMNAME PATH_TO_GEM_DISTRO

Now, one caveat is that this override is global. How to fix?

bundle config --local local.GEMNAME PATH_TO_GEM_DISTRO. Now bundle update GEMNAME and you're in business.

Until today I had been editing the local .config file to remove these overrides, but then I learned about

bundle config --delete local.GEMNAME. (no need to specify whether local or global. Caveat: deletes that override both globally and locally.)

Enjoy!