2013-08-02 57 views
0

關於如何解決此問題的任何想法?一切使用工作正常,當我部署使用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 
[email protected]:~/myapp$ 

回答

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/

+0

我添加安裝和裝載寶石set:bundle_dir,'' set:bundle_flags,'--system --quiet'到我的deploy/production.rb中,但得到相同的錯誤。這是你的意思嗎?所以我的production.rb現在看起來像:require'rvm/capistrano' server'1.2.3',:app,:web,:db,:bg,:primary => true set:rvm_type,:user set: rvm_ruby_string,'ree-1.8.7-2012.02' set:bundle_dir,'' set:bundle_flags,'--system --quiet' set:user,'xxx' set:password,「xxx」 set: use_sudo,假 組:ssh_options,{:forward_agent =>真} 組:分支, '生產' 組:RAILS_ENV, '生產' 組:deploy_to, '/無功/網絡/應用/ MyApp的/' 組: keep_releases,5 – CHarris

+0

現在的錯誤日誌應該不同 – mpapis