3

내 프로젝트를 Rails 4.2으로 업그레이드하려고합니다. 모든 내 종속성은 내 Gemfile입니다. 내 Gemfile에서 이전 버전 번호 제한을 삭제했으며 내 Gemfile.lockbundle install을 삭제했습니다. 내가 희망으로 (지금까지 내가 말할 수있는) 모든 것을 업그레이드, 그러나 것 나는 다음과 같은 오류 얻을 db:setup 레이크 않을 때 :레일 3.2에서 4.2로 업그레이드 -> 해당 파일을로드 할 수 없습니다. - resque_scheduler/tasks

[email protected] ~/g/s/g/n/j/x> rake db:setup --trace 
rake aborted! 
LoadError: cannot load such file -- resque_scheduler/tasks 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' 
/home/p/gop/src/github.com/x/x/x/lib/tasks/resque.rake:2:in `<top (required)>' 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load' 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load' 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' 
/var/lib/gems/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load' 
/var/lib/gems/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:658:in `block in run_tasks_blocks' 
/var/lib/gems/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:658:in `each' 
/var/lib/gems/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:658:in `run_tasks_blocks' 
/var/lib/gems/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:452:in `run_tasks_blocks' 
/var/lib/gems/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:453:in `load_tasks' 
/var/lib/gems/2.3.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `public_send' 
/var/lib/gems/2.3.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `method_missing' 
/home/p/gop/src/github.com/x/x/x/Rakefile:7:in `<top (required)>' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:79:in `block in run' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/lib/rake/application.rb:77:in `run' 
/var/lib/gems/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>' 
/usr/local/bin/rake:23:in `load' 
/usr/local/bin/rake:23:in `<main>' 

내가 구글 어딘가에 추천 행운 (톱으로 gem 'resque-scheduler', '~> 2.5.5'를 사용 해봤를). 또한 행운이없는 Github 경로를 제공하려고했습니다. 관련성이 있는지는 확실치 않지만 내 Gemfile에는 하이픈이 있으며 오류에는 밑줄이 있습니다. 그게 그 일과 관련이 있니?

다음
source 'https://rubygems.org' 

gem 'rails' 
gem 'postgresql' 
gem 'haml' 

# Base-62 conversion library 
gem 'radix62' 

# Generated views will default to haml 
gem 'haml-rails' 

gem 'resque' 
gem 'resque-scheduler' 
gem 'activeadmin', github: 'activeadmin' 
gem 'activeresource' 

group :development do 
    gem 'pry-rails' 
end 

# Gems used only for assets and not required 
# in production environments by default. 
group :assets do 
    gem 'sass-rails' 
    gem 'coffee-rails' 
    gem 'therubyracer', :platforms => :ruby 
    gem 'uglifier' 
end 

gem 'jquery-rails' 

내 Gemfile.lock입니다 :

이처럼 내 Gemfile는 모습입니다

GIT 
    remote: git://github.com/activeadmin/activeadmin.git 
    revision: f0243d495067a8e5b03bd017fe04c5b7de422870 
    specs: 
    activeadmin (1.0.0.pre2) 
     arbre (~> 1.0, >= 1.0.2) 
     bourbon 
     coffee-rails 
     formtastic (~> 3.1) 
     formtastic_i18n 
     inherited_resources (~> 1.6) 
     jquery-rails 
     jquery-ui-rails 
     kaminari (~> 0.15) 
     rails (>= 3.2, < 5.0) 
     ransack (~> 1.3) 
     sass-rails 
     sprockets (< 4) 

GEM 
    remote: https://rubygems.org/ 
    specs: 
    actionmailer (4.2.6) 
     actionpack (= 4.2.6) 
     actionview (= 4.2.6) 
     activejob (= 4.2.6) 
     mail (~> 2.5, >= 2.5.4) 
     rails-dom-testing (~> 1.0, >= 1.0.5) 
    actionpack (4.2.6) 
     actionview (= 4.2.6) 
     activesupport (= 4.2.6) 
     rack (~> 1.6) 
     rack-test (~> 0.6.2) 
     rails-dom-testing (~> 1.0, >= 1.0.5) 
     rails-html-sanitizer (~> 1.0, >= 1.0.2) 
    actionview (4.2.6) 
     activesupport (= 4.2.6) 
     builder (~> 3.1) 
     erubis (~> 2.7.0) 
     rails-dom-testing (~> 1.0, >= 1.0.5) 
     rails-html-sanitizer (~> 1.0, >= 1.0.2) 
    activejob (4.2.6) 
     activesupport (= 4.2.6) 
     globalid (>= 0.3.0) 
    activemodel (4.2.6) 
     activesupport (= 4.2.6) 
     builder (~> 3.1) 
    activerecord (4.2.6) 
     activemodel (= 4.2.6) 
     activesupport (= 4.2.6) 
     arel (~> 6.0) 
    activeresource (4.1.0) 
     activemodel (~> 4.0) 
     activesupport (~> 4.0) 
     rails-observers (~> 0.1.2) 
    activesupport (4.2.6) 
     i18n (~> 0.7) 
     json (~> 1.7, >= 1.7.7) 
     minitest (~> 5.1) 
     thread_safe (~> 0.3, >= 0.3.4) 
     tzinfo (~> 1.1) 
    arbre (1.0.3) 
     activesupport (>= 3.0.0) 
    arel (6.0.3) 
    bourbon (4.2.7) 
     sass (~> 3.4) 
     thor (~> 0.19) 
    builder (3.2.2) 
    coderay (1.1.1) 
    coffee-rails (4.1.1) 
     coffee-script (>= 2.2.0) 
     railties (>= 4.0.0, < 5.1.x) 
    coffee-script (2.4.1) 
     coffee-script-source 
     execjs 
    coffee-script-source (1.10.0) 
    concurrent-ruby (1.0.2) 
    erubis (2.7.0) 
    execjs (2.7.0) 
    formtastic (3.1.4) 
     actionpack (>= 3.2.13) 
    formtastic_i18n (0.6.0) 
    globalid (0.3.6) 
     activesupport (>= 4.1.0) 
    haml (4.0.7) 
     tilt 
    haml-rails (0.9.0) 
     actionpack (>= 4.0.1) 
     activesupport (>= 4.0.1) 
     haml (>= 4.0.6, < 5.0) 
     html2haml (>= 1.0.1) 
     railties (>= 4.0.1) 
    has_scope (0.6.0) 
     actionpack (>= 3.2, < 5) 
     activesupport (>= 3.2, < 5) 
    html2haml (2.0.0) 
     erubis (~> 2.7.0) 
     haml (~> 4.0.0) 
     nokogiri (~> 1.6.0) 
     ruby_parser (~> 3.5) 
    i18n (0.7.0) 
    inherited_resources (1.6.0) 
     actionpack (>= 3.2, < 5) 
     has_scope (~> 0.6.0.rc) 
     railties (>= 3.2, < 5) 
     responders 
    jquery-rails (4.1.1) 
     rails-dom-testing (>= 1, < 3) 
     railties (>= 4.2.0) 
     thor (>= 0.14, < 2.0) 
    jquery-ui-rails (5.0.5) 
     railties (>= 3.2.16) 
    json (1.8.3) 
    kaminari (0.17.0) 
     actionpack (>= 3.0.0) 
     activesupport (>= 3.0.0) 
    libv8 (3.16.14.15) 
    loofah (2.0.3) 
     nokogiri (>= 1.5.9) 
    mail (2.6.4) 
     mime-types (>= 1.16, < 4) 
    method_source (0.8.2) 
    mime-types (3.1) 
     mime-types-data (~> 3.2015) 
    mime-types-data (3.2016.0521) 
    mini_portile2 (2.1.0) 
    minitest (5.9.0) 
    mono_logger (1.1.0) 
    multi_json (1.12.1) 
    nokogiri (1.6.8) 
     mini_portile2 (~> 2.1.0) 
     pkg-config (~> 1.1.7) 
    pg (0.18.4) 
    pkg-config (1.1.7) 
    polyamorous (1.3.0) 
     activerecord (>= 3.0) 
    postgresql (1.0.0) 
     pg 
    pry (0.10.3) 
     coderay (~> 1.1.0) 
     method_source (~> 0.8.1) 
     slop (~> 3.4) 
    pry-rails (0.3.4) 
     pry (>= 0.9.10) 
    rack (1.6.4) 
    rack-protection (1.5.3) 
     rack 
    rack-test (0.6.3) 
     rack (>= 1.0) 
    radix62 (1.0.1) 
    rails (4.2.6) 
     actionmailer (= 4.2.6) 
     actionpack (= 4.2.6) 
     actionview (= 4.2.6) 
     activejob (= 4.2.6) 
     activemodel (= 4.2.6) 
     activerecord (= 4.2.6) 
     activesupport (= 4.2.6) 
     bundler (>= 1.3.0, < 2.0) 
     railties (= 4.2.6) 
     sprockets-rails 
    rails-deprecated_sanitizer (1.0.3) 
     activesupport (>= 4.2.0.alpha) 
    rails-dom-testing (1.0.7) 
     activesupport (>= 4.2.0.beta, < 5.0) 
     nokogiri (~> 1.6.0) 
     rails-deprecated_sanitizer (>= 1.0.1) 
    rails-html-sanitizer (1.0.3) 
     loofah (~> 2.0) 
    rails-observers (0.1.2) 
     activemodel (~> 4.0) 
    railties (4.2.6) 
     actionpack (= 4.2.6) 
     activesupport (= 4.2.6) 
     rake (>= 0.8.7) 
     thor (>= 0.18.1, < 2.0) 
    rake (11.2.2) 
    ransack (1.7.0) 
     actionpack (>= 3.0) 
     activerecord (>= 3.0) 
     activesupport (>= 3.0) 
     i18n 
     polyamorous (~> 1.2) 
    redis (3.3.0) 
    redis-namespace (1.5.2) 
     redis (~> 3.0, >= 3.0.4) 
    ref (2.0.0) 
    responders (2.2.0) 
     railties (>= 4.2.0, < 5.1) 
    resque (1.26.0) 
     mono_logger (~> 1.0) 
     multi_json (~> 1.0) 
     redis-namespace (~> 1.3) 
     sinatra (>= 0.9.2) 
     vegas (~> 0.1.2) 
    resque-scheduler (4.3.0) 
     mono_logger (~> 1.0) 
     redis (~> 3.3) 
     resque (~> 1.26) 
     rufus-scheduler (~> 3.2) 
    ruby_parser (3.8.2) 
     sexp_processor (~> 4.1) 
    rufus-scheduler (3.2.1) 
    sass (3.4.22) 
    sass-rails (5.0.4) 
     railties (>= 4.0.0, < 5.0) 
     sass (~> 3.1) 
     sprockets (>= 2.8, < 4.0) 
     sprockets-rails (>= 2.0, < 4.0) 
     tilt (>= 1.1, < 3) 
    sexp_processor (4.7.0) 
    sinatra (1.4.7) 
     rack (~> 1.5) 
     rack-protection (~> 1.4) 
     tilt (>= 1.3, < 3) 
    slop (3.6.0) 
    sprockets (3.6.2) 
     concurrent-ruby (~> 1.0) 
     rack (> 1, < 3) 
    sprockets-rails (3.1.1) 
     actionpack (>= 4.0) 
     activesupport (>= 4.0) 
     sprockets (>= 3.0.0) 
    therubyracer (0.12.2) 
     libv8 (~> 3.16.14.0) 
     ref 
    thor (0.19.1) 
    thread_safe (0.3.5) 
    tilt (2.0.5) 
    tzinfo (1.2.2) 
     thread_safe (~> 0.1) 
    uglifier (3.0.0) 
     execjs (>= 0.3.0, < 3) 
    vegas (0.1.11) 
     rack (>= 1.0.0) 

PLATFORMS 
    ruby 

DEPENDENCIES 
    activeadmin! 
    activeresource 
    coffee-rails 
    haml 
    haml-rails 
    jquery-rails 
    postgresql 
    pry-rails 
    radix62 
    rails 
    resque 
    resque-scheduler 
    sass-rails 
    therubyracer 
    uglifier 

BUNDLED WITH 
    1.12.5 
+0

'libque/tasks/..'에서'resque-scheduler'가 필요한 파일을 확인할 수 있습니까? – oreoluwa

+0

그래, 내가 가지고있는 .rake 작업이 있습니다 : 'resque/tasks'필요, 'resque_scheduler'필요 및 'resque_scheduler/tasks'필요 - resque-scheduler/tasks 여야합니까? – b0xxed1n

답변

6

작업을 필요로하는 Resque-Scheduler documentation 상태, 당신은 할 필요가 :

require 'resque/scheduler/tasks'

에서 변경해야한다고 생각합니다. 그 대신에!

+1

나는 그것이 감사하다고 생각한다. :) – b0xxed1n