【发布时间】:2011-04-05 17:05:04
【问题描述】:
我正在尝试使用 Capistrano 部署我的应用程序,但收到以下错误消息:
`deploy:setup' 仅对匹配 {:except=>{:no_release=>true}} 的服务器运行,但没有匹配的服务器
运行此命令时:
bundle exec cap deploy:setup
这是我的 deploy.rb 文件。
set :application, "example.com"
set :repository, "git@github.com:username/repo.git"
set :use_sudo, false
set :scm, :git
set :web, application
set :app, application
set :db, application
set :branch, "master"
set :user, "webmaster"
set :deploy_to, "/opt/www/#{application}"
set :deploy_via, :remote_cache
set :domain, application
set :port, 2222
set :bundler_cmd, "bundle install --deployment --without=development,test"
ssh_options[:paranoid] = false
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart_stalker do
run "cd #{deploy_to}/current && thor stalker:kill && stalker:init"
end
task :restart, :roles => :app, :except => { :no_release => true } do
run "cd #{deploy_to}/current && touch tmp/restart.txt"
end
after "bundler_cmd", "deploy:restart_stalker"
end
我正在使用 Rails 3。
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 capistrano