Remove Gem from RVM Gemset?

21,289

Solution 1

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.

Solution 2

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

Share:
21,289
Meltemi
Author by

Meltemi

Updated on December 04, 2020

Comments

  • Meltemi
    Meltemi over 3 years

    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 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?

  • Meltemi
    Meltemi over 13 years
    thanks. got the gems "removed" but that only leads to another problem. see above
  • Nikita Rybak
    Nikita Rybak over 13 years
    @Meltemi Never worked with rspec myself, but there're loads of similar reports in google: google.com/search?hl=en&safe=off&q=ruby+spec+`bin_path':+can‌​'t+find+executable+s‌​pec+for+rspec++(Gem:‌​:Exception)&aq=f&aqi‌​=&aql=&oq=&gs_rfai=
  • Meltemi
    Meltemi over 13 years
    thanks for your help. i was able to figure it out. my fault...probably...but not sure what i did...but it seems to be working now. confusing stuff...
  • user2918201
    user2918201 almost 12 years
    basictrading.biz/2011/06/… this might also help