LoginSignup
6
6

More than 5 years have passed since last update.

capistranoで、デプロイ環境毎にGemfileを変更したい時の設定

Posted at

capistrano-extなどで、複数環境でデプロイをしているときに、環境毎にGemfileを切り替えようとして、はまったのでメモ

環境用デプロイファイル
#環境変数設定
set :default_environment, {
      'BUNDLE_GEMFILE' => "Other_Gemfile",
}

# require 'bundler/capistrano'用設定
set :bundle_gemfile, "Other_Gemfile"
set :bundle_flags, "--quiet"

bundler/capistranoでGemfileを指定して実行される場合と、環境変数でよしなに実行される場合の、それぞれに、Gemfileを指定してあげればなんとかなった。

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6