I've run "bundle install" on an existing Rails 3 app which has the gems in vendor/cache (I guess they were packed via "bundle package" before) and valid Gemfile and Gemfile.lock files.
What I saw is, it created a folder .bund开发者_如何转开发le in my home dir.
I am using also RVM. When I tried "gem list", I didn't see any of the gems in vendor/cache installed.
Am I doing something wrong? Everywhere the bundler articles say, execute "bundle" or "bundle install" to install the gems in the Gemfile and Gemfile.lock files. Is the problem connected with the RVM usage?
Thanks for any advice.
If you give an argument to bundle install
, it will keep installing the gems inside this directory, even if you rm -rf
that directory and start from scratch with the pure bundle install
, as noted in Emil's comment. This new directory is taken by default by bundler, and it even supersedes what you declare in the .rvmrc
file.
To remove this constraint, simply edit the .bundle/config
file and delete the file declaring BUNDLE_PATH
, e.g.,
BUNDLE_PATH: /usr/local/lib/
Look in rvm env gemdir
, also check what you've got set in .rvmrc
in terms of a gemset. Do bundle install
and it should get all the gems.
Check .bundle
by doing $ cat .bundle
to see its content , and check if it is copying the gems to vendor/ruby
. This will only be the case if bundle install --path vendor/ruby
was supplied (Ref).
精彩评论