레일을 사용하여 샘플 앱을 빌드하고 capistrano를 사용하여 블루 호스트에 배포하려고합니다. 하지만 그렇게하지 못하고 있습니다. 나는이 내 설정/deploy.rb의 내용입니다이 http://vasil-y.com/2012/08/21/rails-capistrano-git-bluehost/capistrano를 통해 레일스 앱을 블루 호스트에 배포하는 중 오류가 발생했습니다.
에 언급 된 지침을 따랐 :
require 'bundler/capistrano'
set :application, "rails_scaffold"
# BlueHost SSH user
set :user, "username"
# App Domain
set :domain, "example.com"
# We don't need sudo on BlueHost
set :use_sudo, false
# git is our SCM
set :scm, :git
# master is our default git branch
set :branch, "master"
# Use local git repository
set :repository, "#{domain}:/home/#{user}/rails_apps/#{application}"
set :local_repository, "."
# Checkout, compress and send a local copy
set deploy_via, :copy
set deploy_to, "/home/#{user}/rails_apps/#{application}"
# We have all components of the app on the same server
server domain, :app, :web, :db, :primary => true
namespace :deploy do
task :start do ; end
task :stop do ; end
# Touch tmp/restart.txt to tell Phusion Passenger about new version
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{File.join(current_path, 'tmp', 'restart.txt')}"
end
end
# Clean-up old releases
after "deploy:restart", "deploy:cleanup"
을하지만 캡 배포를 실행하면 설치 명령을, 나는 다음과 같은 오류가 발생합니다 :
/home/swaroop/.rvm/gems/ruby-1.9.3-p362/gems/capistrano-2.14.2/lib/capistrano/configuration/variables.rb:22:in `set': invalid variable `/u/apps/rails_scaffold' (variables must begin with an underscore, or a lower-case letter) (ArgumentError)
응용 프로그램 이름은 밑줄 또는 소문자로 시작해야합니다. 내 응용 프로그램 이름이 유효 한 것처럼 보입니다. 내가 여기서 뭐하는거야?
set deploy_via, :copy
set deploy_to, "/home/#{user}/rails_apps/#{application}"
사람들은해야합니다 :
set :deploy_via, :copy
set :deploy_to, "/home/#{user}/rails_apps/#{application}"
(deploy_via
및 deploy_to
전에 콜론 주)
set
전화의 당신을 상징하지 않은 인수를
답장을 보내 주셔서 감사합니다. 확실히 이것을 시도 할 것입니다. – swaroopsm