How do you uninstall RVM gem?

2019-06-20 17:08发布

Strange... but this is what I got :

$ gem list | grep rvm
>> rvm (1.11.3.3)
$ gem uninstall rvm
>> INFO:  gem "rvm" is not installed

How can that be possible? The root of this problem probably stems from me downloading the latest RVM and finding that it does not work with the latest version of POW. Thus I had to implode RVM and reinstall an older version. Since then when I do a cap deploy, I get the classic :

`<top (required)>': RVM - Capistrano integration was extracted to a separate gem, install: `gem install rvm-capistrano` and remove the `$LOAD_PATH.unshift` line, note also the 'set :rvm_type, :user' is now the default (instead of :system). (RuntimeError)

Any ideas?

8条回答
【Aperson】
2楼-- · 2019-06-20 17:24

The version of RVM might not be compatible with POW. You can remove RVM and then install the most current version.

查看更多
beautiful°
3楼-- · 2019-06-20 17:32

That would be correct. Its in the 'global' gemset. This gemset is 'mixed in' to both the 'default' gemset and any gemsets you actually create.

Thus if you have Ruby 1.9.3 installed, for example, (rvm install 1.9.3) it will be installed into that ruby's 'global'. You can verify this by doing 'gem list rvm -dl' which will show you the name, version, description, and location on the disk of the requested gem.

∴ gem list rvm -dl

*** LOCAL GEMS ***

rvm (1.11.3.3)
    Authors: Wayne E. Seguin, Michal Papis
    Homepage: https://rvm.beginrescueend.com/
    Installed at: /home/me/.rvm/gems/ruby-1.9.3-p194@global

    RVM Ruby Gem Library
∴

I don't know why you want it removed, but you would do as Abe stated as the second choice.

查看更多
Bombasti
4楼-- · 2019-06-20 17:33

I recently encountered the same rvm error:

"RVM - Capistrano integration was extracted to a separate gem, install: gem install rvm-capistrano and remove the $LOAD_PATH.unshift line, note also the 'set :rvm_type, :user' is now the default (instead of :system). (RuntimeError)"

Doing what the error suggested did not work for me at all.

What did work for me was to do: rvm -v

When I did this I saw that my rvm version was rvm 1.13.0

Using "rvm get" I did "rvm get 1.12.0" but still got the error

Then I tried "rvm get 1.11.0" and then presto, my rvm started working again.

I'm not 100% sure what caused the error in the first place but I think it all began when I tried to upgrade rvm with rvm get stable after I was unable to install some gems. I found out that I wasn't able to install gems anymore due to the fact that I had updated my xcode to 4.3.2 and apparently Apple changed their c complier which doesn't play nice with rvm.

Hope this helps someone.

查看更多
来,给爷笑一个
5楼-- · 2019-06-20 17:34

Nathan got it right: https://stackoverflow.com/a/10306090/294449

You used to have to do the unshift in your deploy.rb but the latest versions of RVM have made that hack no longer necessary. Just remove it and add the rvm-capistrano gem to your Gemfile. It works like a charm.

查看更多
该账号已被封号
6楼-- · 2019-06-20 17:41

To give more details, RVM works with POW, this is known issue: https://github.com/37signals/pow/issues/271

the easiest solution(in project dir):

rvm env . > .powenv
查看更多
狗以群分
7楼-- · 2019-06-20 17:43

Are you in a gemset? If so, that gem might be in the interpreter's unnamed gemset or the global gemset. If so, try

rvm use 1.9.3
gem uninstall rvm

or

rvm use 1.9.3@global
gem uninstall rvm
查看更多
登录 后发表回答