我正在运行这个命令 'heroku run -a my_app RAILS_ENV=production rake -T --trace' 我收到这个堆栈跟踪:
rake aborted!
undefined method `task' for #<Rspec::Core::RakeTask:0x00000002e82d60>
/app/lib/tasks/rspec.rake:9:in `initialize'
/app/lib/tasks/rspec.rake:39:in `new'
/app/lib/tasks/rspec.rake:39:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `block in load'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `block in load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:145:in `load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/Rakefile:12:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in `block in load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:72:in `block in run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
.bundle/gems/ruby/1.9.1/bin/rake:19:in `load'
.bundle/gems/ruby/1.9.1/bin/rake:19:in `<main>'
这是我的 gemfile 的一部分:
gem "rails", "~> 3.2.13"
gem 'json', '~>1.7.7'