views:

79

answers:

2

This might sound as a strange thing to do. Is there a bundler way to extract the bundled gems (from a Gemfile or from .bundle) and install them as system gems outside of the bundler context?

Something like bundle package, but instead of caching them in vendor/cache, installs them as system gems.

A: 

When you run bundle install your gems are installed to your BUNDLE_PATH (which defaults to ~/.bundle.

You can pass an argument specifying where you want to install your gems to; bundle install /usr/local/lib/bundle. From the user manual, "Further bundle commands or calls to Bundler.setup or Bundler.require will remember this location".

Of course, you'll need to use sudo to install to a system directory.

Is that what you're after?

nfm
+1  A: 

The new bundler does this by default

Samer Abukhait