Rails beginner
Rails beginner

Reputation: 14504

Rails 3 rake error You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2

When I run rake db:migrate in my console:

rake aborted!
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2. C
onsider using bundle exec.

(See full trace by running task with --trace)

C:\Rails\myapp>bundle install
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.9)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.9)
Using erubis (2.6.6)
Using rack (1.2.4)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.30)
Using actionpack (3.0.9)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.9)
Using arel (2.0.10)
Using activerecord (3.0.9)
Using activeresource (3.0.9)
Using addressable (2.2.6)
Using bundler (1.0.18)
Using multipart-post (1.1.4)
Using faraday (0.7.6)
Using friendly_id (4.0.0)
Using hashie (1.2.0)
Using json (1.6.1)
Using multi_json (1.0.4)
Using mysql (2.8.1)
Using oauth2 (0.5.2)
Using omniauth (1.0.2)
Using omniauth-oauth2 (1.0.0)
Using omniauth-facebook (1.2.0)
Using rdoc (3.10)
Using thor (0.14.6)
Using railties (3.0.9)
Using rails (3.0.9)
Using rest-client (1.6.7)
Using sequel (3.20.0)
Using simple_form (1.5.2)
Using sinatra (1.0)
Using sqlite3 (1.3.4)
Using sqlite3-ruby (1.3.3)
Using taps (0.3.23)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem
is installed.

rake aborted!
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2. C
onsider using bundle exec.

(See full trace by running task with --trace)

Upvotes: 1

Views: 3681

Answers (2)

Patru
Patru

Reputation: 4551

The same happened to me, bundle exec of course worked in the Terminal, but RubyMine would not listen. It turned out that the global gemset used the newer rake-version than the my 'local' gem set, I ended up uninstalling rake from the global gemset to make RubyMine happy again (after a restart that is).

Upvotes: 0

stfcodes
stfcodes

Reputation: 1380

This is probably because you have a newer Rake version on your system. You can do as the error says: bundle exec rake db:migrate which runs rake in your application context (rake 0.9.2), or just delete your Gemfile.lock and bundle again.

Upvotes: 7

Related Questions