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

后端 未结 7 738
花落未央
花落未央 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:48

    You must use 'gem uninstall gem_name' to uninstall a gem.

    Note that if you installed the gem system-wide (ie. sudo bundle install) then you may need to specify the binary directory using the -n option, to ensure binaries belonging to the gem are removed. For example

    sudo gem uninstall gem_name  -n /usr/lib/ruby/gems/1.9.1/bin
    

提交回复
热议问题