What is the best way to uninstall gems from a rails3 project?

后端 未结 7 724
花落未央
花落未央 2021-01-29 23:25

I installed all of my gems using bundler via the Gemfile. I thought (mistakenly) that if I deleted a gem from my Gemfile and ran \'bundle install\' that the deleted gems would b

7条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-29 23:46

    This will uninstall a gem installed by bundler:

    bundle exec gem uninstall GEM_NAME
    

    Note that this throws

    ERROR: While executing gem ... (NoMethodError) undefined method `delete' for #

    but the gem is actually removed. Next time you run bundle install the gem will be reinstalled.

提交回复
热议问题