开发者

Remove Gem from RVM Gemset?

New to RVM and playing with Rails 3 & Ruby 1.9.2 betas...

I've got two copies of rspec in a gemset. Was using beta.19 but need to downgrade to beta.18. changed my gemfile and then 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.

Though the Gemfile is requiring beta.18, beta.19 is still running interference...and rspec is开发者_如何学Go barfing all over my log files...

Edit: Thanks to Nikita I was able to remove the beta.19 gems. 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?


How about gem uninstall rspec -v=2.0.0.beta.19 ? Check gem help uninstall for details.

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. In my case the offending gems were in the @global gemsets and i was only able to remove them by doing

rvm @global do gem uninstall the-gem-name

Other commands like rvm all-gemsets do... and rvm all do... did not work

See this thread

How do I use RVM and create globally available gems?

and the doc

http://rvm.io/set/do


I had the same error message but what I needed to do was add the rspec rails to my :development group as well as :test, YMMV

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜