Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

unicorn + capistrano-rsyncの環境で、undefined method `set' for main:Object (NoMethodError) が発生した場合

More than 5 years have passed since last update.

こんなエラーが発生しまして。

E, [2015-01-07T01:46:36.842850 #2619] ERROR -- : undefined method `set' for main:Object (NoMethodError)
/Users/okitsu.takatomo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/capistrano-rsync-1.0.2/lib/capistrano/rsync.rb:8:in `<top (required)>'
/Users/okitsu.takatomo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:85:in `require'
/Users/okitsu.takatomo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:85:in `rescue in block in require'
/Users/okitsu.takatomo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:68:in `block in require'
/Users/okitsu.takatomo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:in `each'
/Users/okitsu.takatomo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:in `require'
/Users/okitsu.takatomo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.7.11/lib/bundler.rb:134:in `require'
/Users/okitsu.takatomo/Documents/workspace/app_server/config/application.rb:7:in `<top (required)>'
/Users/okitsu.takatomo/Documents/workspace/app_server/config/environment.rb:2:in `require'
/Users/okitsu.takatomo/Documents/workspace/app_server/config/environment.rb:2:in `<top (required)>'
config.ru:4:in `require'
config.ru:4:in `block in <main>'

以下で解決 (require: falseの付与)

gem 'capistrano'
gem 'capistrano-rails', require: false
gem 'capistrano-rsync', require: false
gem 'capistrano-rbenv', require: false
gem 'capistrano-bundler', require: false
gem 'capistrano3-unicorn', require: false
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away