我一直在尝试运行 rake,但似乎自从我更新了 ruby gems rake 就失败了。
今天早上我跑了:
gem update --system
从那以后,rake 一直失败并出现以下错误:
$ rake db:migrate
rake aborted!
undefined method `specifications' for "/usr/lib/ruby/gems/1.9.1":String
/home/cknadler/projects/ecommerce/Rakefile:7:in `<top (required)>'
(See full trace by running task with --trace)
我一直在阅读有关此问题的信息,似乎 rake 0.9.x 存在问题,它破坏了轨道,但是当我检查我的 rake 版本时,我正在运行 0.8.7:
$ rake --version
rake, version 0.8.7
我已经尝试卸载 rake 并重新安装它,使用捆绑器等,此时我非常卡住。提前致谢。
编辑:
我的 Rakefile(位于我的应用程序根目录中)
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'rake'
Ecommerce::Application.load_tasks