我正在为我的rails应用设置生产部署。但由于未知原因无法建立。我已经成功地修复了一整天而没有成功。我的问题在哪里?我能解决吗?请!
➜ Buyi git:(develop) ✗ cap production deploy:setup --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke rvm:hook (first_time)
** Invoke passenger:rvm:hook (first_time)
** Invoke passenger:test_which_passenger (first_time)
** Execute passenger:test_which_passenger DEBUG [50f77fca] Running /usr/bin/env which passenger as x@x DEBUG [50f77fca] Command: ( export PATH="~/.rvm/gems/ruby-2.2.1@buyi/bin:$PATH" ; /usr/bin/env which passenger ) DEBUG [50f77fca] /home/ec2-user/.rvm/gems/ruby-2.2.1@buyi/bin/passenger DEBUG [50f77fca] Finished in 5.666 seconds with exit status 0 (successful).
** Execute passenger:rvm:hook
** Execute rvm:hook
** Invoke rvm:check (first_time)
** Execute rvm:check DEBUG [70b71b8b] Running ~/.rvm/bin/rvm version as x@x DEBUG [70b71b8b] Command: ( export PATH="~/.rvm/gems/ruby-2.2.1@buyi/bin:$PATH" ; ~/.rvm/bin/rvm version ) DEBUG [70b71b8b] rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] DEBUG [70b71b8b] Finished in 1.158 seconds with exit status 0 (successful). rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] DEBUG [44456560] Running ~/.rvm/bin/rvm current as x@x DEBUG [44456560] Command: ( export PATH="~/.rvm/gems/ruby-2.2.1@buyi/bin:$PATH" ; ~/.rvm/bin/rvm current ) DEBUG [44456560] ruby-2.2.1 DEBUG [44456560] Finished in 1.118 seconds with exit status 0 (successful). ruby-2.2.1 DEBUG [e03a5cf7] Running ~/.rvm/bin/rvm ruby-2.2.1@buyi do ruby --version as x@x DEBUG [e03a5cf7] Command: ( export PATH="~/.rvm/gems/ruby-2.2.1@buyi/bin:$PATH" ; ~/.rvm/bin/rvm ruby-2.2.1@buyi do ruby --version ) DEBUG [e03a5cf7] ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux] DEBUG [e03a5cf7] Finished in 1.084 seconds with exit status 0 (successful). ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
** Invoke bundler:map_bins (first_time)
** Invoke passenger:bundler:hook (first_time)
** Execute passenger:bundler:hook
** Execute bundler:map_bins
** Invoke deploy:set_rails_env (first_time)
** Execute deploy:set_rails_env
** Invoke deploy:set_linked_dirs (first_time)
** Execute deploy:set_linked_dirs
** Invoke deploy:set_rails_env
cap aborted! Don't know how to build task 'deploy:setup'
在我的Capfile中,我有以下内容:
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/passenger'
答案 0 :(得分:0)
看起来好像你依赖标准的设置任务。您需要将其添加到您的上限文件中:
# Capfile
require 'capistrano/setup'
并确保运行bundle exec cap production deploy:setup
。
来源:http://capistranorb.com/documentation/getting-started/flow/
你正在使用第3章,对吧?