Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 Ruby on Rails 应用程序不是我的 git 存储库的根文件。是否可以设置一个变量,以便 Capistrano 在我要求它运行迁移时知道要运行 rake 的目录?
我会通过覆盖这样的deploy:migrate食谱来做到这一点:
deploy:migrate
namespace :deploy do task :migrate do run "cd /path/to/rails/root; rake RAILS_ENV=#{rails_env} #{migrate_env} db:migrate" end end