简体   繁体   中英

Capistrano: Cap aborted! Don't know how to build task 'deploy:setup'

I am setting up production deployment for my rails app. But it was unable to build for unknown reason. I have managed to fix it for the whole day without success. where is my problem? can i fix it? please!

➜  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'     

In my Capfile, I have these:

require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rvm'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/passenger'

Looks as though you're relying on the standard setup task to be there. You'll need to add it your cap file:

# Capfile
require 'capistrano/setup'

and make sure to run bundle exec cap production deploy:setup .

Source: http://capistranorb.com/documentation/getting-started/flow/

Your are using cap 3, right?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM