How can I remove a default gem? ! want to uninstall a gem 1.7.7 version of json

前端 未结 3 1239
误落风尘
误落风尘 2020-12-03 10:24

I have the same rails app in OSX and Ubuntu, I want to use Zeus to speed up my rspec. In Ubuntu, Zeus starts Ok, but in OSX it always be crashed. At last I find the issue,

3条回答
  •  情深已故
    2020-12-03 11:13

    may be this will help you....

    bundle exec gem uninstall GEM_NAME
    

    if above cmd not work then try this

    execute this either in irb or in a script proper:

    `gem list --no-versions`.split("\n").each do |gem|
      `gem list -d #{gem}`.gsub(/Installed at(.*):.*/).each do |dir|
        dir = dir.gsub(/Installed at(.*): /,'').gsub("\n", '')
        system "gem uninstall #{gem} -aIx -i #{dir}"
      end  
    end
    

    if above both are fails then try this

    go to your rvm dir.. where all gems are install then manually remove that gem which you want.. such as in my case my gem dir location is /home/user_name/.rvm/gems/ruby-1.9.3-p194/gems

提交回复
热议问题