Capistrano多阶段部署对bundler(路径问题)很奇怪

时间:2011-07-08 16:36:40

标签: capistrano bundler

我对capistrano / bundler有这个非常奇怪的问题,我很困惑...... 我有两个阶段:制作和舞台 当我执行cap production bundle:install时,它运行良好并运行:

executing "cd /var/www/whatever/releases/20110506112617 && bundle install --gemfile /var/www/whatever/releases/20110506112617/Gemfile --path /var/www/whatever/shared/bundle --deployment --quiet --without development test"

一切都很好,但是当我跑cap staging bundle:install时,我得到了这个:

failed: "sh -c 'cd /var/www/staging.whatever/releases/shared && bundle install --gemfile /var/www/staging.whatever/releases/shared/Gemfile --path /var/www/staging.whatever/shared/bundle --deployment --quiet --without development test'" on whatever.org

不应该是

sh -c 'cd /var/www/staging.whatever/releases/shared && bundle install --gemfile /var/www/staging.whatever/releases/shared/Gemfile

但是

sh -c 'cd /var/www/staging.whatever/releases/20110506112617 && bundle install --gemfile /var/www/staging.whatever/releases/20110506112617/Gemfile

current_path有问题,我不知道为什么......它总是指向发布/共享,这是完全错误的......

我运行capistrano 2.6.0,非常感谢任何帮助

- Flo

1 个答案:

答案 0 :(得分:3)

只需删除“共享”版本

即可
rm -rf /var/www/staging.whatever/releases/shared