我已经切换到在命令行上使用 heroku toolbelt 没有问题。但是,我的 rake 任务现在失败了:
=> Running "heroku run rake --trace db:migrate --app MYAPPNAME"
/Users/USERNAME/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:143:in `block in replace_gem': heroku is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /Users/USERNAME/.rvm/gems/ruby-1.9.2-p290/bin/heroku:18:in `<main>'
rake aborted!
ERROR running "heroku run rake --trace db:migrate --app MYAPPNAME"
/Users/USERNAME/Code/luxr/lib/shell.rb:35:in `execute'
/Users/USERNAME/Code/luxr/lib/tasks/deploy_tasks.rake:22:in `block (2 levels) in <top (required)>'
Tasks: TOP => deploy:production
(See full trace by running task with --trace)
heroku run rake --trace db:migrate --app MYAPPNAME
直接在命令行中键入相同的命令没有问题。
想法?
更新:我安装了 heroku toolbelt,但我注意到它在 ruby 1.9.3 上,我的应用程序是 1.9.2p290,这是导致问题的原因吗?
$ heroku version
heroku-toolbelt/2.34.0 (x86_64-darwin10.8.0) ruby/1.9.3
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]