延迟工作不使用ruby 2.2.1和rails 3.2.22

时间:2016-01-08 11:02:54

标签: ruby ruby-on-rails-3 delayed-job

我已经更新了我的项目以使用ruby 2.2.1,这应该在Rails 3.2.22上得到支持(参见http://weblog.rubyonrails.org/2015/6/16/Rails-3-2-22-4-1-11-and-4-2-2-have-been-released-and-more/

我的delayed_jobs坏了:

class Feedback 
  TestJob = Struct.new(:id) do
  def perform
    puts "test job running #{id}"
  end
  def self.run_test_job
    Delayed::Job.enqueue TestJob.new(1)
  end
end

在rails控制台(开发)中,我Feedback.run_test_job

让工作人员运行rake jobs:work

我得到了这个

[Worker(host:pro-vincent.home pid:62850)] Starting job worker
[Worker(host:pro-vincent.home pid:62850)] Job Feedback::TestJob (id=39) RUNNING

应打印test job running 1。我用ruby 2.1.1测试过,它工作正常。

我错过了什么让它起作用?

Gemfile.lock的

GIT
  remote: http://github.com/kalv/webrat.git
  revision: 66130e4b9e903e07cfa86286655bde439c7b376e
  specs:
    webrat (0.7.2.pre)
      nokogiri (>= 1.2.0)
      rack (>= 1.0)
      rack-test (>= 0.5.3)

GEM
  remote: https://rubygems.org/
  specs:
    CFPropertyList (2.3.2)
    actionmailer (3.2.22)
      actionpack (= 3.2.22)
      mail (~> 2.5.4)
    actionpack (3.2.22)
      activemodel (= 3.2.22)
      activesupport (= 3.2.22)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.22)
      activesupport (= 3.2.22)
      builder (~> 3.0.0)
    activerecord (3.2.22)
      activemodel (= 3.2.22)
      activesupport (= 3.2.22)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.22)
      activemodel (= 3.2.22)
      activesupport (= 3.2.22)
    activesupport (3.2.22)
      i18n (~> 0.6, >= 0.6.4)
      multi_json (~> 1.0)
    arel (3.0.3)
    aws-sdk (2.2.5)
      aws-sdk-resources (= 2.2.5)
    aws-sdk-core (2.2.5)
      jmespath (~> 1.0)
    aws-sdk-resources (2.2.5)
      aws-sdk-core (= 2.2.5)
    bcrypt (3.1.10)
    bootstrap-sass (2.3.2.2)
      sass (~> 3.2)
    builder (3.0.4)
    capistrano (2.15.7)
      highline
      net-scp (>= 1.0.0)
      net-sftp (>= 2.0.0)
      net-ssh (>= 2.0.14)
      net-ssh-gateway (>= 1.1.0)
    chronic (0.10.2)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.10.0)
    daemons (1.2.3)
    delayed_job (4.1.1)
      activesupport (>= 3.0, < 5.0)
    delayed_job_active_record (4.1.0)
      activerecord (>= 3.0, < 5)
      delayed_job (>= 3.0, < 5)
    devise (3.5.3)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      responders
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    erubis (2.7.0)
    excon (0.45.4)
    execjs (2.6.0)
    fission (0.5.0)
      CFPropertyList (~> 2.2)
    fog (1.36.0)
      fog-aliyun (>= 0.1.0)
      fog-atmos
      fog-aws (>= 0.6.0)
      fog-brightbox (~> 0.4)
      fog-core (~> 1.32)
      fog-dynect (~> 0.0.2)
      fog-ecloud (~> 0.1)
      fog-google (<= 0.1.0)
      fog-json
      fog-local
      fog-powerdns (>= 0.1.1)
      fog-profitbricks
      fog-radosgw (>= 0.0.2)
      fog-riakcs
      fog-sakuracloud (>= 0.0.4)
      fog-serverlove
      fog-softlayer
      fog-storm_on_demand
      fog-terremark
      fog-vmfusion
      fog-voxel
      fog-xenserver
      fog-xml (~> 0.1.1)
      ipaddress (~> 0.5)
      nokogiri (~> 1.5, >= 1.5.11)
    fog-aliyun (0.1.0)
      fog-core (~> 1.27)
      fog-json (~> 1.0)
      ipaddress (~> 0.8)
      xml-simple (~> 1.1)
    fog-atmos (0.1.0)
      fog-core
      fog-xml
    fog-aws (0.7.6)
      fog-core (~> 1.27)
      fog-json (~> 1.0)
      fog-xml (~> 0.1)
      ipaddress (~> 0.8)
    fog-brightbox (0.10.1)
      fog-core (~> 1.22)
      fog-json
      inflecto (~> 0.0.2)
    fog-core (1.35.0)
      builder
      excon (~> 0.45)
      formatador (~> 0.2)
    fog-dynect (0.0.2)
      fog-core
      fog-json
      fog-xml
    fog-ecloud (0.3.0)
      fog-core
      fog-xml
    fog-google (0.1.0)
      fog-core
      fog-json
      fog-xml
    fog-json (1.0.2)
      fog-core (~> 1.0)
      multi_json (~> 1.10)
    fog-local (0.2.1)
      fog-core (~> 1.27)
    fog-powerdns (0.1.1)
      fog-core (~> 1.27)
      fog-json (~> 1.0)
      fog-xml (~> 0.1)
    fog-profitbricks (0.0.5)
      fog-core
      fog-xml
      nokogiri
    fog-radosgw (0.0.4)
      fog-core (>= 1.21.0)
      fog-json
      fog-xml (>= 0.0.1)
    fog-riakcs (0.1.0)
      fog-core
      fog-json
      fog-xml
    fog-sakuracloud (1.5.0)
      fog-core
      fog-json
    fog-serverlove (0.1.2)
      fog-core
      fog-json
    fog-softlayer (1.0.2)
      fog-core
      fog-json
    fog-storm_on_demand (0.1.1)
      fog-core
      fog-json
    fog-terremark (0.1.0)
      fog-core
      fog-xml
    fog-vmfusion (0.1.0)
      fission
      fog-core
    fog-voxel (0.1.0)
      fog-core
      fog-xml
    fog-xenserver (0.2.2)
      fog-core
      fog-xml
    fog-xml (0.1.2)
      fog-core
      nokogiri (~> 1.5, >= 1.5.11)
    font-awesome-rails (3.2.1.3)
      railties (>= 3.2, < 5.0)
    formatador (0.2.5)
    geocoder (1.2.12)
    geoip (1.6.1)
    google_visualr (2.5.1)
    haml (4.0.7)
      tilt
    highline (1.7.8)
    hike (1.2.3)
    hipchat (1.5.2)
      httparty
      mimemagic
    httparty (0.13.7)
      json (~> 1.8)
      multi_xml (>= 0.5.2)
    i18n (0.7.0)
    inflecto (0.0.2)
    ipaddress (0.8.0)
    jmespath (1.1.3)
    journey (1.0.4)
    jquery-rails (3.1.4)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (3.0.1)
      jquery-rails
      railties (>= 3.1.0)
    json (1.8.3)
    kaminari (0.16.3)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    kaminari-bootstrap (3.0.1)
      kaminari (>= 0.13.0)
      rails
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.25.1)
    mimemagic (0.3.0)
    mini_portile2 (2.0.0)
    multi_json (1.11.2)
    multi_xml (0.5.5)
    mysql2 (0.3.15)
    nested_form (0.3.2)
    net-scp (1.2.1)
      net-ssh (>= 2.6.5)
    net-sftp (2.1.2)
      net-ssh (>= 2.6.5)
    net-ssh (3.0.1)
    net-ssh-gateway (1.2.0)
      net-ssh (>= 2.6.5)
    nokogiri (1.6.7)
      mini_portile2 (~> 2.0.0.rc2)
    orm_adapter (0.5.0)
    polyglot (0.3.5)
    pony (1.11)
      mail (>= 2.0)
    power_assert (0.2.6)
    rack (1.4.7)
    rack-cache (1.5.1)
      rack (>= 0.4)
    rack-pjax (0.8.0)
      nokogiri (~> 1.5)
      rack (~> 1.1)
    rack-ssl (1.3.4)
      rack
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (3.2.22)
      actionmailer (= 3.2.22)
      actionpack (= 3.2.22)
      activerecord (= 3.2.22)
      activeresource (= 3.2.22)
      activesupport (= 3.2.22)
      bundler (~> 1.0)
      railties (= 3.2.22)
    rails-settings-cached (0.2.4)
      rails (>= 3.0.0)
    rails_admin (0.4.9)
      bootstrap-sass (~> 2.2)
      builder (~> 3.0)
      coffee-rails (>= 3.1, < 5)
      font-awesome-rails (~> 3.0)
      haml (~> 4.0)
      jquery-rails (>= 2.1, < 4)
      jquery-ui-rails (~> 3.0)
      kaminari (~> 0.14)
      nested_form (~> 0.3)
      rack-pjax (~> 0.6)
      rails (~> 3.1)
      remotipart (~> 1.0)
      safe_yaml (~> 0.6)
      sass-rails (~> 3.1)
    railties (3.2.22)
      actionpack (= 3.2.22)
      activesupport (= 3.2.22)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    rake (10.4.2)
    rdoc (3.12.2)
      json (~> 1.4)
    remotipart (1.2.1)
    responders (1.1.2)
      railties (>= 3.2, < 4.2)
    rvm-capistrano (1.5.6)
      capistrano (~> 2.15.4)
    safe_yaml (0.9.3)
    sass (3.4.20)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sprockets (2.2.3)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sqlite3 (1.3.11)
    syck (1.0.5)
    test-unit (3.1.5)
      power_assert
    thor (0.19.1)
    thread_safe (0.3.5)
    tilt (1.4.1)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.46)
    uglifier (2.7.2)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    warden (1.2.4)
      rack (>= 1.0)
    whenever (0.9.4)
      chronic (>= 0.6.3)
    xml-simple (1.1.5)
    yaml_db (0.3.0)
      rails (>= 3.0, < 4.3)
      rake (>= 0.8.7)

PLATFORMS
  ruby

DEPENDENCIES
  aws-sdk
  coffee-rails (~> 3.2.1)
  daemons
  delayed_job_active_record
  devise
  fog
  geocoder
  geoip
  google_visualr
  hipchat
  jquery-rails
  kaminari
  kaminari-bootstrap
  mysql2 (= 0.3.15)
  pony
  rails (~> 3)
  rails-settings-cached (= 0.2.4)
  rails_admin
  rvm-capistrano
  safe_yaml (= 0.9.3)
  sass-rails (~> 3.2.3)
  sqlite3
  syck
  test-unit
  uglifier (>= 1.0.3)
  webrat!
  whenever
  yaml_db

编辑:Gemfile.lock

0 个答案:

没有答案