我最近更新了我的gem后,我的capistrano设置有一些问题。我有一个多阶段设置与生产和阶段设置。
/config/deploy.rb
# setup multistage
set :stages, %w(testing production)
set :default_stage, "testing"
require 'capistrano/ext/multistage'
/config/deploy/production.rb
# Set deploy path
set :deploy_to, "/var/www/mysite/live"
set :rails_env, "production"
/config/deploy/testing.rb
# Set deploy path
set :deploy_to, "/var/www/mysite/test"
set :rails_env, "test"
问题是它似乎忽略了我的deploy_to设置。它只是部署到默认的/u/apps/mysite。
我不知道它是否有任何相关性,所有这一切的原因都是从apache+passenger迁移到nginx+unicorn。我不认为这与此有任何关系,因为这只是结帐过程。
发布于 2015-09-17 19:56:27
我最终通过将以下代码添加到我的部署/生产.rb和testing.rb中解决了这个问题
set(:deploy_to) { "/var/www/#{application}/live" }
set(:releases_path) { File.join(deploy_to, version_dir) }
set(:shared_path) { File.join(deploy_to, shared_dir) }
set(:current_path) { File.join(deploy_to, current_dir) }
set(:release_path) { File.join(releases_path, release_name) }
发布于 2011-11-21 22:36:50
这些production.rb和testing.rb在项目中的什么位置?
确保它们在config/deploy
下。
https://stackoverflow.com/questions/8213376
复制相似问题