0
這裏是我的deploy.rb文件Capistrano的部署沒有這樣的文件或目錄
require "bundler/capistrano"
set :rvm_ruby_string, "ruby-2.0.0-p247"
set :rvm_type, :user
set :application, "myproject"
set :repository, "[email protected]:user/project.git"
set :user, "server-login-name"
set :branch, "master"
set :stages, %w{staging production}
require 'capistrano/ext/multistage'
set :deploy_via, :copy
set :use_sudo, true
set :rvm_install_with_sudo, true
default_run_options[:pty] = true
set :port, 2021
set :scm, :git
role :web, "mydomain.com"
role :app, "mydomain.com"
role :db, "mydomain.com", :primary => true
role :db, "mydomain.com"
after "deploy:update_code","deploy:config_symlink"
set :rvm_type, :system
# If you are using Passenger mod_rails uncomment this:
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
task :config_symlink do
#run "cp #{release_path}/config/database.yml.example #{release_path}/config/database.yml"
end
end
before 'deploy', 'rvm:install_ruby'
before 'deploy', 'rvm:create_gemset'
我staging.rb和production.rb在單獨的文件
set :deploy_to, "/var/rails_apps/project_stage"
set :deploy_to, "/var/rails_apps/project"
現在我面臨兩個以下錯誤
1. triggering before callbacks for `deploy'
the task `rvm:install_ruby' does not exist
如果我評論rvm:install_ruby
和rvm:create_gemset
2. cannot open: no such file or directory for all my file and folders
我找不到爲什麼會發生這種情況。任何人都可以幫助
我不明白你的意思。你什麼意思? – overflow
您在1.問題中提到的任務根本不存在。它們不是您使用的寶石的特徵。 –
2.這不是一個capistrano錯誤消息 –