Cannot activate rake (= 0.9.2.2, runtime) for [], already activated rake-10.0.2 for []

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

cannot activate rake (= 0.9.2.2, runtime) for [], rake-10.0.2 for [] is already activated

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

So, I type gem uninstall rake -v 10.0.3. At the prompt, the deletion was successful, but version 10.0.3 still exists when I make a list of gems, and I still get the same problem when I try to run any rake command.

Any suggestions?

Thanks in advance Tim

+6
source share
2 answers

You can:

  • run bundle exec rake to use the rake version specified on your Gemfile.lock if you don't want to update it.
  • Update the rake version used in Gemfile.lock by running bundle update rake and you can use the rake command again!
+9
source

You probably have an earlier version of the rake specified in your Gemfile.lock . Try running bundle update rake , which should update everything related to rake and modify your Gemfile.lock.

+14
source

All Articles