我試着去部署使用Capistrano的我的應用服務器上運行,但我得到這個錯誤信息:部署使用Capistrano的 - 只爲匹配
`部署:設置」僅用於服務器匹配{運行:除了= > {:no_release =>真}},但沒有服務器匹配
運行此命令:
bundle exec cap deploy:setup
這是我deploy.rb文件。
set :application, "example.com"
set :repository, "[email protected]: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
完美,謝謝! – Oleander 2011-04-05 21:51:12