6

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

Tim Mitchell
  • 643
  • 2
  • 13
  • 29

2 Answers2

14

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.

Andrea Singh
  • 1,593
  • 13
  • 23
9

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 !