我正在使用MySQL Server 5.7(64位),MySQL Connector C 6.1 6.1.2(32位),Ruby 1.9.3p392(2013-02-)在Windows 7(64位)上通过Lynda.com完成Ruby on Rails 3 Essential Training教程. 22)[i386-mingw32]和Rails 3.2.12.
在培训中,我在"数据库和迁移"部分尝试将我在MySQL中创建的数据库与我的Rails项目同步,但是我一直在遇到中止消息.
教师要求我的班级通过命令提示符打开我们的rails项目并执行Rake以使用以下代码构建"schema.rb":
这就是我现在运行"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)
我该怎么做才能获得Gemfile需要的rake?
所以活跃的gem版本10.1.1,但你的项目有依赖10.0.3
要解决bundle exec
之前 使用rake db:schema:dump
bundle exec rake db:schema:dump
正如你在Gemfile中旧版本,你可以做gem uninstall rake
,bundle install
这将安装的正确版本rake
.