上传带有capistrano的rails 4应用程序到dreamhost

时间:2014-08-08 17:19:23

标签: ruby-on-rails capistrano dreamhost

我正在尝试使用capistrano将rails 4应用程序部署到梦想主机。每次我跑cap deploy:cold这都是我得到的,

  

舞台未设置,请调用封面制作部署等内容,   生产是你定义的阶段。

这是我的设置:

require 'bundler/capistrano'

set :application, "mywebsite.com" # Your application location on your server goes here

default_run_options[:pty] = true

set :repository,  "."
set :scm, :none
set :deploy_via, :copy

set :checkout, 'export'

set :user, 'user name' # Your username goes here
set :use_sudo, false
set :domain, 'mywebsite.com' # Your domain goes here
set :applicationdir, "/home/#{user}/#{application}"
set :deploy_to, applicationdir

role :web, domain                 
role :app, domain                          
role :db,  domain, :primary => true 


set :chmod755, "app config db lib public vendor script script/* public/disp*"

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

1 个答案:

答案 0 :(得分:1)

要使用capistrano 3.x脚本进行部署,您需要指定stage。试试这个:

cap production deploy:cold