Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't activate rake (= 0.9.2.2, runtime) for [], already activated rake-10.0.2 for [] [duplicate]

Tags:

ruby

gem

I'm trying to run a simple rake task. When I do, I get the following error:

can't activate rake (= 0.9.2.2, runtime) for [], already activated rake-10.0.2 for []

I run the gem list command, and it lists rake as having 10.0.3, 0.9.2.2, and 0.8.7.

So, I type gem uninstall rake -v 10.0.3. According to the prompt, the uninstall was successful - but version 10.0.3 is still there when I do a gem list - and I still get the exact same problem when I try to run any rake task.

Any suggestions?

Thanks in advance, Tim

like image 435
Tim Mitchell Avatar asked Dec 25 '12 03:12

Tim Mitchell


2 Answers

You probably have the older version of rake listed in your Gemfile.lock. Try to run bundle update rake, which should update everything rake-related and change your Gemfile.lock as well.

like image 161
Andrea Singh Avatar answered Nov 01 '22 00:11

Andrea Singh


You can either :

  • run bundle exec rake to use the version of rake listed on your Gemfile.lock if you don't want to update it
  • Update the version of rake used in your Gemfile.lock by running bundle update rake and then you will be able to use the command rake again !
like image 38
Benoit Marilleau Avatar answered Nov 01 '22 02:11

Benoit Marilleau