Extract bundled gems into system gems
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) a开发者_运维知识库nd 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.
The new bundler does this by default
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?
精彩评论