【问题标题】:Capistrano deployment errorCapistrano 部署错误
【发布时间】:2013-02-13 11:01:29
【问题描述】:

我是 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

【问题讨论】:

  • 您的机器上是否正在运行 Web 服务器和数据库?
  • 网络服务器是的,我正在运行....我需要数据库...你能告诉我所有的步骤吗..

标签: ruby-on-rails-3.2 capistrano


【解决方案1】:

确保您的机器中启用了 ssh 代理。

【讨论】:

  • 网络服务器是的,我正在运行......我需要数据库......你能告诉我所有的步骤......
猜你喜欢
  • 2013-04-05
  • 2015-07-22
  • 1970-01-01
  • 1970-01-01
  • 2016-10-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多