Associations 1 - 3/9 - Gem::LoadError on rake


Hi, I am receiving the following error when attempting to run rake db:migrate on section 9 of Associations 1:

rake db:migrate
rake aborted!
Gem::LoadError: You have already activated rake 10.4.2, but your Gemfile requires rake 10.3.2. Prepending bundle exec to your command may solve this
/var/lib/gems/2.0.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:34:in block in setup'
/var/lib/gems/2.0.0/gems/bundler-1.7.3/lib/bundler.rb:121:in setup'
/home/ccuser/workspace/learn-rails-one-to-many/config/boot.rb:4:in <top (required)>'
/home/ccuser/workspace/learn-rails-one-to-many/Rakefile:4:in `'
(See full trace by running task with --trace)

It let me continue, but the error reads as though the action was not actually taken. Any assistance would be appreciated.




Have you tried what it suggested?

If that doesn't do it, then:
I haven't dealt enough with rails to say what action exactly to take based on the error message but a start would be to remove Gemfile.lock and run bundle install in the website's directory


Yes, I tried that. It then gives me an error that it cannot build 'rake'. It seems to be letting me move on through the course without trouble though, so I'll just leave this here for devs to look into.



Is continuing anyway a problem for the following exercises? What easy ways around this are there?
Editing Gemfile to match the installed rake version?


I was able to get the same/similar error, and prepending bundle exec to the command was enough. (That makes it execute the versions specified in the Gemfile instead of what your system's path finds first)


It hasn't put up any trouble for me for the remainder of the lesson so far, so if it lets you through, just keep going I guess.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.