removing gems

27 views
Skip to first unread message

r144

unread,
Sep 25, 2013, 9:38:56 AM9/25/13
to rubyversi...@googlegroups.com
hello all,

once in a while, when making a new gemset, I forget to use the gemset after 'rvm gemset create'-ing it. The result is that after a 'bundle install', the gems are placed in the wrong place.

Today this happened again: after a succesful install, I found the gems in the proper directory:

$ ls ~/.rvm/gems/jruby-1.6.5@xslt4/gems
aruba-0.5.3/         gherkin-2.11.8-java/    rspec-core-2.14.5/
builder-3.2.2/       jruby-openssl-0.9.0/    rspec-expectations-2.14.3/
childprocess-0.3.9/  multi_json-1.8.0/       rspec-mocks-2.14.3/
cucumber-1.2.5/      rack-1.5.2/             sinatra-1.4.2/
diff-lcs-1.2.4/      rack-protection-1.5.0/  tilt-1.4.1/
ffi-1.9.0-java/      rspec-2.14.1/

But I realized I installed them too in the default location

$ ls ~/.rvm/gems/jruby-1.6.5/gems     
aruba-0.5.3/         gherkin-2.12.1-java/         rack-protection-1.5.0/
builder-3.2.2/       jruby-launcher-1.0.12-java/  rake-0.9.2/
bundler-1.0.22/      jruby-launcher-1.0.15-java/  rspec-2.14.1/
bundler-1.3.1/       jruby-launcher-1.0.17-java/  rspec-core-2.14.5/
bundler-1.3.5/       jruby-openssl-0.9.0/         rspec-expectations-2.14.3/
childprocess-0.3.9/  multi_json-1.8.0/            rspec-mocks-2.14.3/
cucumber-1.3.8/      multi_test-0.0.2/            sinatra-1.4.2/
diff-lcs-1.2.4/      net-sftp-2.1.2/              tilt-1.4.1/
ffi-1.9.0-java/      rack-1.5.2/

What is the best way of removing them? Can I do this best with a bundler or rvm command, or is rm -r possible too?

I have the same question for clearing gems after downgrading:
- I installed cucumber 1.3.8 in the gemset I used
- after I found out this leads to problems, I downgraded cucumber to 1.2.5, but the 1.3.8 version remained in the gemset.
- I wonder how this 1.3.8 version can be safely removed.
- rm -f did cause me problems

thanks in advance, Ruud

mpapis

unread,
Sep 26, 2013, 2:18:28 PM9/26/13
to rubyversi...@googlegroups.com
try: rvm gemset empty

you can prefix it with: rvm @default do

r144

unread,
Sep 30, 2013, 2:42:36 AM9/30/13
to rubyversi...@googlegroups.com


On Thursday, 26 September 2013 20:18:28 UTC+2, mpapis wrote:
try: rvm gemset empty

you can prefix it with: rvm @default do


 
But I realized I installed them too in the default location

$ ls ~/.rvm/gems/jruby-1.6.5/gems     

Thanks, I will try that. The only thing I am uncertain about is the name: this one has no gemset in its path. If I specify @default, will it not empty the jruby-1.6.5@default/gems directory instead of jruby-1.6.5/gems?

And is the effect of rvm gemset empty the same as rm -r jruby-1.6.5@name/gems/* ?

regards, Ruud

mpapis

unread,
Oct 18, 2013, 5:43:36 PM10/18/13
to rubyversi...@googlegroups.com
@default is just a trick to target the default gemset with no name
Reply all
Reply to author
Forward
0 new messages