Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble removing rake 0.9

I am having some trouble removing the rake gem version 0.9. I managed to run gem uninstall rake and I believed this to have deleted it. However, going back to gem list it still showed that it still exists.

Running gem env:

GEM PATHS:
   /home/sean/.rvm/gems/ruby-1.9.2-p180
   /home/sean/.rvm/gems/ruby-1.9.2-p180@global

I went into the @global directory and manually deleted it there, yet still it remains somewhere. I can see it when I run gem list. The 0.9 rake gem is causing problems for my Rails 3.0.7 application.

I ran gem list -d rake:

rake (0.9.0, 0.8.7)

Installed at 
(0.9.0): /home/sean/.rvm/gems/ruby-1.9.2-p180@global
(0.8.7): /home/sean/.rvm/gems/ruby-1.9.2-p180

I don't see anything in the gems directory for ruby-1.9.2-p180@global

like image 677
sean Avatar asked May 23 '11 01:05

sean


3 Answers

You should run

rvm use @global && gem uninstall rake -v 0.9.0  
rvm use @ && gem uninstall rake -v 0.9.0

to correctly remove rake 0.9.0 from rvm

like image 101
Alexey Chernikov Avatar answered Nov 16 '22 02:11

Alexey Chernikov


In terminal type in: gem uninstall rake, then select version 0.9.0 when prompted.

Then modify your Gemfile within your Rails application:

gem 'rake', '0.8.7'

Then in terminal run:

bundle install

These steps should fix the problems you are having. Upgrade to rake again when you upgrade to rails 3.1.

like image 27
JZ. Avatar answered Nov 16 '22 02:11

JZ.


If you're using rvm you get rake 0.9 installed "for free" in the global gemset which makes it hard (impossible?) to uninstall properly. gem uninstall rake is successful but doesn't actually remove rake 0.9. I had to do it manually for both REE and 1.9.2.

I edited the rake executable script (find with which rake) and added a:

puts "Gem.bin_path: #{Gem.bin_path('rake', 'rake', version)}

...before the last line. This prints (on my system): Gem.bin_path: ~/.rvm/gems/ree-1.8.7-2011.03@global/gems/rake-0.9.0/bin/rake

To remove 0.9 cd into ~/.rvm/gems/ree-1.8.7-2011.03 and manually delete all rake-0.9 files (gems, specifications are the ones that count I believe).

like image 2
dvdplm Avatar answered Nov 16 '22 01:11

dvdplm