You have already activated rake 0.9.0, but your Gemfile requires rake 0.8.7

I'm trying to run rails project, I get

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

If I do: "bundle install"

but I'm getting

You have already activated rake 0.9.0, but your Gemfile requires rake 0.8.7

while doing

rake db:migrate

Solution 1:

First, check to make sure that rake is mentioned in your Gemfile. If it's not, add it, and specify the version "you already activated".

Then, you'll need to tell bundle to update the rake version it's using for your app:

bundle update rake

It'll update your Gemfile.lock for you.

Solution 2:

Where you are currently using rake commands like

rake db:migrate

Use this instead:

bundle exec rake db:migrate

this will be the case until the latest version of rails and/or rake work well together.