问题
I'm trying to remove a gem from my project so I went into the gem file and commented it out.
...
gem some_gem
# gem 'gem_I_dont_want'
gem another_gem
....
Then I run
bundle
To check that the gem is gone, I type
bundle show
But I still see the gem there
...
* some_gem
* gem_I_dont_want
* another_gem
Am I not understanding how bundle works? Is there something more I'm suppose to do?
回答1:
The gem could be a dependency of another gem which would explain its presence in bundle show
.
If the gem appears indented beneath another gem within the Gemfile.lock file then it would indicate that it's included still because it's a dependency.
回答2:
There is still this gem until you clean your Bundle using:
bundle clean
But you don't need to fear. It mean that this package is installed but it wouldn't load into your app until you let it.
来源:https://stackoverflow.com/questions/17157375/how-to-remove-gems-from-rails-project