运行作业时出错:使用RAILS_ENV =生产

时间:2013-07-22 10:05:14

标签: ruby-on-rails delayed-job rake-task

运行作业时出现以下错误:使用RAILS_ENV=production选项

执行rake任务
C:\RailsProject>rake jobs:work RAILS_ENV=production --trace
(in C:/RailsProject)
** Invoke environment (first_time)
** Execute environment
** Invoke jobs:work (first_time)
** Invoke merb_env (first_time)
** Execute merb_env
** Invoke environment
** Execute jobs:work
rake aborted!
Expected c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/delayed_job-2.0.8/lib/delayed/worker.rb to define Delayed::Worker
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:426:in `load_missing_constant'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/delayed_job-2.0.8/lib/delayed/tasks.rb:13:in `(root)'
org/jruby/RubyProc.java:270:in `call'
org/jruby/RubyProc.java:220:in `call'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
org/jruby/RubyArray.java:1620:in `each'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
c:/jruby-1.6.8/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
c:/jruby-1.6.8/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
org/jruby/RubyArray.java:1620:in `each'

是否可以使用作业:为生产工作rake任务?

0 个答案:

没有答案