I am completing the tutorial Ruby on Rails 3 Essential Training through Lynda.com on Windows 7 (64 bits) using MySQL Server 5.7(64bits), MySQL Connector C 6.1 6.1.2 (32bits), Ruby 1.9.3p392 (2013-02-22) [i386-mingw32] and Rails 3.2.12.
In the training, I am in the section on "Databases and Migrations" attempting to sync the database I have created in MySQL with my Rails project, however I have been running into an abort message.
The instructor asked my class to go through Command Prompt to open up our rails project and perform a Rake to build a "schema.rb" with this code:
This is what it says now when I run "db:schema:dump"
C:\\Sites\\todo>rake db:schema:dump rake aborted!
You have already activated rake 10.1.1, but your Gemfile requires rake 10.0.3.
Using bundle exec may solve this.
C:/Sites/todo/config/boot.rb:6:in
'`
C:/Sites/todo/config/application.rb:1:in
'`
C:/Sites/todo/Rakefile:4:in
'`
(See full trace by running task with --trace)
What do I do to get the rake that the Gemfile needs?
So active gem version 10.1.1, but your project have dependency 10.0.3
To solve just use bundle exec
before rake db:schema:dump
bundle exec rake db:schema:dump
As you have older version at Gemfile, you can do gem uninstall rake
, bundle install
, this will install proper version of rake
.
To solve this issue, I decided to delete Windows off of my computer and download a Linux distribution called Ubuntu. This completely bypassed the issue by changing the programming environment I was in and thereby accelerated me in a programming environment suitable to perform in Ruby. I didn't have to spend any money on a new computer, but I did lose about 3 months time waiting to get an answer to this question.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.