我已经部署到沙盒环境就好了,但是当我去部署到生产环境时。将托管在不同服务器上的一种。App server 和 Web server 合二为一,DB server 是分开的。
我正在使用 Capistrano 3,这是我运行时出现的错误,我bundle exec cap production setup
收到了这个错误 - 我删除了 IP_address。基本信息。单独的数据库,单独的 Redis / Resque 服务器,单独的工作人员......我很难过......
[fd6d0d1d] Command: cd /var/www/gru/releases/20151113234954 && ( PATH=/opt/ruby/bin:$PATH RAILS_ENV=production ~/.rvm/bin/rvm default do bundle exec rake assets:precompile )
DEBUG [fd6d0d1d] rake aborted!
DEBUG [fd6d0d1d] TypeError: can't dup NilClass
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `dup'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `initialize'
DEBUG [fd6d0d1d] /var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `new'
DEBUG [fd6d0d1d] /var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `<top (required)>'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:652:in `block in load_config_initializer'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:651:in `load_config_initializer'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `each'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `block in <class:Engine>'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `each'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `tsort_each_child'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
DEBUG [fd6d0d1d] /var/www/gru/releases/20151113234954/config/environment.rb:5:in `<top (required)>'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:328:in `require_environment!'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:457:in `block in run_tasks_blocks'
DEBUG [fd6d0d1d] /var/www/gru/shared/bundle/ruby/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
DEBUG [fd6d0d1d] Tasks: TOP => environment
DEBUG [fd6d0d1d] (See full trace by running task with --trace)
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as clduser@96.119.183.74: rake exit status: 1
rake stdout: rake aborted!
TypeError: can't dup NilClass
/var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `dup'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `initialize'
/var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `new'
/var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `<top (required)>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:651:in `load_config_initializer'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `each'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `each'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
/var/www/gru/releases/20151113234954/config/environment.rb:5:in `<top (required)>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:328:in `require_environment!'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
SSHKit::Command::Failed: rake exit status: 1
rake stdout: rake aborted!
TypeError: can't dup NilClass
/var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `dup'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `initialize'
/var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `new'
/var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `<top (required)>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:651:in `load_config_initializer'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `each'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `each'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
/var/www/gru/releases/20151113234954/config/environment.rb:5:in `<top (required)>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:328:in `require_environment!'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as clduser@<REMOVED>.74: rake exit status: 1
rake stdout: rake aborted!
TypeError: can't dup NilClass
/var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `dup'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis.rb:30:in `initialize'
/var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `new'
/var/www/gru/releases/20151113234954/config/initializers/resque_initialize.rb:4:in `<top (required)>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:651:in `load_config_initializer'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `each'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `each'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `tsort_each_child'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
/var/www/gru/releases/20151113234954/config/environment.rb:5:in `<top (required)>'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:328:in `require_environment!'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/www/gru/shared/bundle/ruby/2.2.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written