Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
138 views
in Technique[技术] by (71.8m points)

ruby on rails 3 - Please require this file from within a Capistrano recipe (LoadError)

I'm using Capistrano 2 with Rails 3 project. Recently I rebuilt my gemset form scratch and now I receive error "Please require this file from within a Capistrano recipe (LoadError)" when I try to run rails server.

Detailed error message:

/Users/leonidlukin/.rvm/rubies/ruby-1.9.3-p429/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/leonidlukin/Sites/moscowshows/script/rails server -b 0.0.0.0 -p 3000 -e development
/Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/capistrano-2.15.5/lib/capistrano/configuration/loading.rb:18:in `instance': Please require this file from within a Capistrano recipe (LoadError)
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/helpers/base.rb:16:in `rvm_with_capistrano'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/helpers/_cset.rb:3:in `<top (required)>'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/base.rb:1:in `<top (required)>'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano/selector.rb:1:in `<top (required)>'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/rvm-capistrano-1.5.6/lib/rvm/capistrano.rb:3:in `<top (required)>'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/bundler-1.8.0/lib/bundler/runtime.rb:85:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/bundler-1.8.0/lib/bundler/runtime.rb:85:in `rescue in block in require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/bundler-1.8.0/lib/bundler/runtime.rb:68:in `block in require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/bundler-1.8.0/lib/bundler/runtime.rb:61:in `each'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/bundler-1.8.0/lib/bundler/runtime.rb:61:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/bundler-1.8.0/lib/bundler.rb:134:in `require'
    from /Users/leonidlukin/Sites/moscowshows/config/application.rb:13:in `<top (required)>'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from /Users/leonidlukin/.rvm/gems/ruby-1.9.3-p429@moscowshows/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
    from /Users/leonidlukin/Sites/moscowshows/script/rails:6:in `require'
    from /Users/leonidlukin/Sites/moscowshows/script/rails:6:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

Which file I should require from within a Capistrano recipe?

question from:https://stackoverflow.com/questions/28461965/please-require-this-file-from-within-a-capistrano-recipe-loaderror

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The problem is with rvm-capistrano.

Correct it in gemfile. require: false

 gem  'rvm-capistrano',  require: false

This should help


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...