简体   繁体   English

从RVM Gemset中删除Gem?

[英]Remove Gem from RVM Gemset?

New to RVM and playing with Rails 3 & Ruby 1.9.2 betas... RVM新手并使用Rails 3和Ruby 1.9.2测试...

I've got two copies of rspec in a gemset. 我在gemset中有两个rspec副本。 Was using beta.19 but need to downgrade to beta.18. 使用beta.19但需要降级到beta.18。 changed my gemfile and then bundle install . 改变了我的gemfile然后bundle install now i have a mess... 现在我搞得一团糟......

*** LOCAL GEMS ***
. . .
rspec (2.0.0.beta.19, 2.0.0.beta.18)
rspec-core (2.0.0.beta.19, 2.0.0.beta.18)
rspec-expectations (2.0.0.beta.19, 2.0.0.beta.18)
rspec-mocks (2.0.0.beta.19, 2.0.0.beta.18)
rspec-rails (2.0.0.beta.19, 2.0.0.beta.18)

and I would like to remove all traces of beta.19 but can't seem to find out how. 我想删除beta.19的所有痕迹,但似乎无法找出如何。

Though the Gemfile is requiring beta.18, beta.19 is still running interference...and rspec is barfing all over my log files... 虽然Gemfile需要beta.18,但beta.19仍在运行干扰......并且rspec正在我的日志文件中进行攻击......

Edit : Thanks to Nikita I was able to remove the beta.19 gems. 编辑 :感谢Nikita,我能够删除beta.19宝石。 now i'm getting a broken path or something: 现在我正在走一条破碎的道路或者什么:

thismac:rails_app meltemi$ spec -v
/Library/Ruby/Site/1.8/rubygems.rb:335:in `bin_path': can't find executable spec for rspec-2.0.0.beta.18 (Gem::Exception)
    from /usr/bin/spec:19
mymac:appname meltemi$

is there something i need to do to rebuild now that 19 is gone and i'm falling back to 18? 现在我需要做些什么才能重建19岁了,我又回到了18岁?

How about gem uninstall rspec -v=2.0.0.beta.19 ? gem uninstall rspec -v=2.0.0.beta.19怎么gem uninstall rspec -v=2.0.0.beta.19 Check gem help uninstall for details. 检查gem help uninstall以获取详细信息。

Or you can just uninstall all versions and then install the one you need. 或者您可以卸载所有版本,然后安装所需的版本。

I had some similar issues with RVM due to the global and default gemsets. 由于全局和默认的gemsets,我在RVM上遇到了类似的问题。 In my case the offending gems were in the @global gemsets and i was only able to remove them by doing 在我的情况下,令人讨厌的宝石出现在@global gemsets中,我只能通过这样做来删除它们

rvm @global do gem uninstall the-gem-name

Other commands like rvm all-gemsets do... and rvm all do... did not work 其他命令,如rvm all-gemsets do...rvm all do...不起作用

See this thread 看到这个帖子

How do I use RVM and create globally available gems? 如何使用RVM并创建全局可用的宝石?

and the doc 和文件

http://rvm.io/set/do http://rvm.io/set/do

我有相同的错误消息,但我需要做的是将rspec rails添加到我的:开发组以及:test,YMMV

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM