How to I undo the vendor/gems bundle install

2019-03-14 23:41发布

问题:

I ran bundle install vendor/gems and all the gems got saved to the gems directory as expected but when i delete them like

rm -rf vendor/gems

rails s
 Could not find rake-0.9.2.2 in any of the sources
 Run `bundle install` to install missing gems.

I need to run bundle install again and all the gems install to the vendor/gems again. Is there a way to get this behavior to stop and just install as I used to using my .rvmrc file and not package the gems in the vendor/gems directory

回答1:

There is a hidden directory called .bundle in the root of your directory. Remove that, then run bundle again.