当我尝试使用capistrano部署Sinatra和sidekiq时遇到一些问题。
在mygem文件中:
gem 'capistrano-sidekiq' , github: 'seuros/capistrano-sidekiq'
Capfile:
require 'capistrano/sidekiq'
Gemfile.lock
capistrano-sidekiq (0.3.3)
sidekiq (3.2.0)
部署时发生错误:
**Don't know how to build task 'restart'**
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/lib/capistrano/dsl/task_enhancements.rb:10:in `after'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/tasks/sidekiq.cap:22:in `block in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/tasks/sidekiq.cap:18:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/sidekiq.rb:2:in `load'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-sidekiq-0.3.3/lib/capistrano/sidekiq.rb:2:in `<top (required)>'
/home/ubuntu/projects/feed_bidder/feed_bidder_offline/Capfile:6:in `require'
/home/ubuntu/projects/feed_bidder/feed_bidder_offline/Capfile:6:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/lib/capistrano/application.rb:22:in `load_rakefile'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/ubuntu/.rvm/gems/ruby-2.1.2/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/cap:23:in `load'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/cap:23:in `<main>'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
另外,当我尝试通过cap production sidekiq:start -T
进行部署时