获取Resque Status以使用jRuby

时间:2011-10-15 16:28:11

标签: ruby rake jruby resque

我有一个应用程序,我已经为后台作业实现了Resque。 Alos,我正在使用gem resque-schedulerresque-status,它们在Ruby 1.9.2上都能顺利运行。

我的应用程序是一个Sinatra应用程序,我已经创建了我的Rakefile

require "resque/tasks"
require "resque_scheduler/tasks"

现在,我正在尝试在jruby 1.6.3 (ruby-1.8.7-p330)下运行该应用程序,但不幸的是,当我尝试运行COUNT=2 VERBOSE=true QUEUE=* rake resque:workers时,我遇到了问题。

终端在将--trace添加到rake命令“

后”抛出此错误
rake aborted!
can't convert Class into String
org/jruby/RubyFile.java:872:in `basename'
org/jruby/RubyFile.java:1069:in `extname'
(eval):3:in `extname_with_potential_path_argument'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:561:in `load_imports'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:502:in `raw_load_rakefile'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:78:in `load_rakefile'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:61:in `run'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/amr/.rvm/gems/jruby-1.6.3@global/gems/rake-0.9.2/bin/rake:32:in `(root)'
org/jruby/RubyKernel.java:1063:in `load'
/Users/amr/.rvm/gems/jruby-1.6.3@global/bin/rake:19:in `(root)'

我跟踪了我的项目文件,以便在我从某个文件中删除require "resque/job_with_status"时发现这一切都运行正常并得到预期的错误i.e. Resque::JobWithStatus couldn't be found

我试图运行jruby --1.9 -S rake ...但它也不起作用!

那么有没有办法让resque-status与jRuby一起使用?

我已经在github上发布了一个问题:https://github.com/quirkey/resque-status/issues/45

提前致谢

0 个答案:

没有答案