我是 ruby 应用程序部署的新手。
我正在尝试在 Capistrano 上部署名为“bookshop”的应用程序。我已经在 github 上上传了我的应用程序,链接为“git@github.com:my_account_name/bookshop.git”
当我执行“cap deploy:setup”时,出现以下错误:
servers: ["localhost"]
connection failed for: localhost (Errno::ECONNREFUSED: Connection refused - connect(2))
任何帮助,将不胜感激
我的“deployment.rb”文件:
set :application, "bookshop"
set :domain,"localhost"
server domain, :web, :app
default_run_options[:pty]= true
set :use_sudo, false
set :aplication,"localhost"
set :scm, :git
set :user, 'bookshop.com'
set :deploy_to, "/home/www/bookshop"
set :repository, "git@github.com:my_account_name/bookshop.git"
role :web, "localhost" # Your HTTP #server, Apache/etc
role :app, "localhost" # This may be the #same as your `Web` server
role :db, "localhost", :primary => true # This is where #Rails migrations will run
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end