你如何卸载RVM gem?

时间:2022-03-21 20:25:21

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 :

怎么可能呢?这个问题的根源可能源于我下载最新的RVM并发现它不能与最新版本的POW一起使用。因此,我不得不内爆RVM并重新安装旧版本。从那以后,当我进行帽子部署时,我得到了经典:

`<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 个解决方案

#1


10  

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

你是宝石吗?如果是这样,那个gem可能在解释器的未命名gemset或全局gemset中。如果是这样,试试吧

rvm use 1.9.3
gem uninstall rvm

or

rvm use 1.9.3@global
gem uninstall rvm

#2


16  

I recently encountered the same rvm error:

我最近遇到了同样的rvm错误:

"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)"

“RVM - Capistrano集成被提取到一个单独的gem,安装:gem install rvm-capistrano并删除$ LOAD_PATH.unshift行,注意'set:rvm_type,:user'现在是默认值(而不是:system)。 (RuntimeError)”

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

做错误提示的内容对我来说根本不起作用。

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

对我有用的是:rvm -v

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

当我这样做时,我看到我的rvm版本是rvm 1.13.0

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

使用“rvm get”我做了“rvm get 1.12.0”,但仍然出错

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

然后我尝试了“rvm get 1.11.0”然后presto,我的rvm再次开始工作。

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.

我不是百分之百确定导致错误的原因,但我认为这一切都是在我尝试使用rvm升级rvm后开始的,因为我无法安装一些宝石。我发现我不能再安装宝石了,因为我已经将我的xcode更新为4.3.2,显然Apple改变了他们的c编译器,这对rvm不起作用。

Hope this helps someone.

希望这有助于某人。

#3


5  

I just ran into this error as well. The error you ran into was because of the recent capistrano update. If you add rvm-capistrano to your gemfile and remove the $LOAD-PATH.unshift line from your capistrano deployment file it should work, at least it did for me.

我也遇到了这个错误。您遇到的错误是因为最近的capistrano更新。如果你将rvm-capistrano添加到你的gemfile并从你的capistrano部署文件中删除$ LOAD-PATH.unshift行它应该可以工作,至少它对我有用。

#4


2  

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.

那是对的。它处于'全球'宝石中。这个gemset与'default'gemset和你实际创建的任何gemsets都“混合”。

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.

因此,如果您安装了Ruby 1.9.3,例如(rvm install 1.9.3),它将被安装到该ruby的“全局”中。您可以通过执行'gem list rvm -dl'来验证这一点,它将显示所请求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.

我不知道你为什么要删除它,但你会像Abe所说的那样做第二选择。

#5


2  

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

为了提供更多细节,RVM与POW一起工作,这是已知的问题:https://github.com/37signals/pow/issues/271

the easiest solution(in project dir):

最简单的解决方案(在项目目录中):

rvm env . > .powenv

#6


2  

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

RVM的版本可能与POW不兼容。您可以删除RVM,然后安装最新版本。

#7


2  

The problem is that RVM 1.12 and up does not play well with Capistrano. So uninstall your RVM, then get RVM 1.11 (rvm get 1.11.0).

问题是RVM 1.12及以上版本与Capistrano不能很好地兼容。所以卸载你的RVM,然后获得RVM 1.11(rvm get 1.11.0)。

#8


-1  

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

内森做对了:https://*.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.

您曾经不得不在deploy.rb中进行unshift,但最新版本的RVM已经不再需要黑客攻击了。只需删除它并将rvm-capistrano gem添加到您的Gemfile中。它就像一个魅力。

#1


10  

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

你是宝石吗?如果是这样,那个gem可能在解释器的未命名gemset或全局gemset中。如果是这样,试试吧

rvm use 1.9.3
gem uninstall rvm

or

rvm use 1.9.3@global
gem uninstall rvm

#2


16  

I recently encountered the same rvm error:

我最近遇到了同样的rvm错误:

"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)"

“RVM - Capistrano集成被提取到一个单独的gem,安装:gem install rvm-capistrano并删除$ LOAD_PATH.unshift行,注意'set:rvm_type,:user'现在是默认值(而不是:system)。 (RuntimeError)”

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

做错误提示的内容对我来说根本不起作用。

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

对我有用的是:rvm -v

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

当我这样做时,我看到我的rvm版本是rvm 1.13.0

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

使用“rvm get”我做了“rvm get 1.12.0”,但仍然出错

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

然后我尝试了“rvm get 1.11.0”然后presto,我的rvm再次开始工作。

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.

我不是百分之百确定导致错误的原因,但我认为这一切都是在我尝试使用rvm升级rvm后开始的,因为我无法安装一些宝石。我发现我不能再安装宝石了,因为我已经将我的xcode更新为4.3.2,显然Apple改变了他们的c编译器,这对rvm不起作用。

Hope this helps someone.

希望这有助于某人。

#3


5  

I just ran into this error as well. The error you ran into was because of the recent capistrano update. If you add rvm-capistrano to your gemfile and remove the $LOAD-PATH.unshift line from your capistrano deployment file it should work, at least it did for me.

我也遇到了这个错误。您遇到的错误是因为最近的capistrano更新。如果你将rvm-capistrano添加到你的gemfile并从你的capistrano部署文件中删除$ LOAD-PATH.unshift行它应该可以工作,至少它对我有用。

#4


2  

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.

那是对的。它处于'全球'宝石中。这个gemset与'default'gemset和你实际创建的任何gemsets都“混合”。

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.

因此,如果您安装了Ruby 1.9.3,例如(rvm install 1.9.3),它将被安装到该ruby的“全局”中。您可以通过执行'gem list rvm -dl'来验证这一点,它将显示所请求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.

我不知道你为什么要删除它,但你会像Abe所说的那样做第二选择。

#5


2  

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

为了提供更多细节,RVM与POW一起工作,这是已知的问题:https://github.com/37signals/pow/issues/271

the easiest solution(in project dir):

最简单的解决方案(在项目目录中):

rvm env . > .powenv

#6


2  

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

RVM的版本可能与POW不兼容。您可以删除RVM,然后安装最新版本。

#7


2  

The problem is that RVM 1.12 and up does not play well with Capistrano. So uninstall your RVM, then get RVM 1.11 (rvm get 1.11.0).

问题是RVM 1.12及以上版本与Capistrano不能很好地兼容。所以卸载你的RVM,然后获得RVM 1.11(rvm get 1.11.0)。

#8


-1  

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

内森做对了:https://*.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.

您曾经不得不在deploy.rb中进行unshift,但最新版本的RVM已经不再需要黑客攻击了。只需删除它并将rvm-capistrano gem添加到您的Gemfile中。它就像一个魅力。