上限生产部署:迁移不起作用

时间:2013-08-02 22:20:13

标签: ruby-on-rails deployment rvm capistrano

关于如何解决这个问题的任何想法?当我使用cap production deploy:migrations进行部署时,所有使用都可以正常工作,但我的rvm搞砸了,我想,我重新安装了它,但我仍然遇到问题。

我正在从Ubuntu终端附加进度,从一切正常进行到出错的地方和最终的错误消息。谢谢你的帮助。

* executing "ln -nfs /var/www/apps/myapp/releases/20130802221024/config/configs/linkedin.yml /var/www/apps/myapp/releases/20130802221024/config/linkedin.yml"
    servers: ["12.34.567.8"]
    [12.34.567.8] executing command
    command finished in 552ms
  * executing "ln -nfs /var/www/apps/myapp/releases/20130802221024/config/configs/resque_schedule.yml /var/www/apps/myapp/releases/20130802221024/config/resque_schedule.yml"
    servers: ["12.34.567.8"]
    [12.34.567.8] executing command
    command finished in 550ms
    triggering after callbacks for `deploy:update_code'
  * executing `deploy:assets:precompile'
  * executing "cd /var/www/apps/myapp/releases/20130802221024 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
    servers: ["12.34.567.8"]
    [12.34.567.8] executing command
 ** [out :: 12.34.567.8] rake aborted!
 ** [out :: 12.34.567.8] Received wrong number of arguments. [nil]
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/omniauth-1.1.0/lib/omniauth/strategy.rb:136:in `initialize'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/stack.rb:43:in `new'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/stack.rb:43:in `build'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/stack.rb:113:in `build'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/application.rb:282:in `inject'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/stack.rb:113:in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/stack.rb:113:in `inject'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/action_dispatch/middleware/stack.rb:113:in `build'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/engine.rb:470:in `build_middleware_stack'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/application/finisher.rb:31
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `run_initializers'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `send'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/releases/20130802221024/config/environment.rb:5
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/railties-3.2.3/lib/rails/application.rb:292:in `initialize_tasks'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:184:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:93
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:
 ** [out :: 12.34.567.8] in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:184:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:205:in `invoke_prerequisites'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:203:in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:203:in `invoke_prerequisites'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:183:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:60
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:184:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:29
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:246:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:184:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
 ** [out :: 12.34.567.8] 
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in `top_level'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in `top_level'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:73:in `run'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
 ** [out :: 12.34.567.8] /var/www/apps/myapp/shared/bundle/ruby/1.8/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
 ** [out :: 12.34.567.8] Tasks: TOP => environment
 ** [out :: 12.34.567.8] (See full trace by running task with --trace)
    command finished in 3985ms
failed: "rvm_path=$HOME/.rvm/ $HOME/.rvm/bin/rvm-shell 'ree-1.8.7-2012.02' -c 'cd /var/www/apps/myapp/releases/20130802221024 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'" on 12.34.567.8
christophecompaq@ubuntu:~/myapp$ 

1 个答案:

答案 0 :(得分:1)

类似的问题已经重复了一段时间,请检查https://github.com/wayneeseguin/rvm-capistrano#disabling-bundle---deployment-when-using-gemsets

set :bundle_dir, ''
set :bundle_flags, '--system --quiet'

这将告诉捆绑商使用GEM_HOME代替/var/www/apps/myapp/shared/bundle/来安装和加载宝石