Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Confused with rake error in Rails 3

Noob trying to decipher what to do with the following error:

rake aborted! You have already activated rake 0.9.1, but your Gemfile requires rake 0.8.7. Consider using bundle exec.

Any help is greatly appreciated.

like image 885
chris Avatar asked Jun 01 '11 17:06

chris


4 Answers

Try running bundle exec rake instead of just rake. This error will occur when you have a newer version of rake installed on your computer than the one specified in your Gemfile (or Gemfile.lock)

like image 157
SZH Avatar answered Oct 22 '22 16:10

SZH


This worked for me:

  1. Add rake 0.8.7 to your Gemfile

    gem 'rake', '0.8.7'
    
  2. remove rake 0.9.1 by doing

    gem uninstall rake -v=0.9.1
    
  3. run bundle update on the terminal

    bundle update
    

Hope that helps. Thanks

Antonio

like image 4
Antonio Avatar answered Oct 22 '22 15:10

Antonio


Do you have...

gem 'rake', '0.8.7'

... in your Gemfile?

If so, remove it.

like image 2
Jits Avatar answered Oct 22 '22 16:10

Jits


This error is a result of having rake 0.9.1 installed on your system but your rake file specifying 0.8.7. You can do bundle exec rake to use rake 0.8.7 or change the version of rake that you need.

like image 1
Zameer Manji Avatar answered Oct 22 '22 15:10

Zameer Manji