我使用的軌道,並試圖利用Capistrano的到BlueHost的部署它構建一個示例應用程序。 但我不這樣做。我跟着這個http://vasil-y.com/2012/08/21/rails-capistrano-git-bluehost/參數錯誤,同時通過Capistrano的應用程序部署軌BLUEHOST
提到的說明這是我的配置/ deploy.rb的內容:
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)
報告說,應用程序的名稱必須以下劃線或小寫字母開頭。我的應用程序名稱看起來像是有效的。 我在這裏做錯了什麼?
謝謝
謝謝你的回覆。肯定會試試這個。 – swaroopsm 2013-05-07 13:26:49