Capistrano 部署 production 環境 從 Rails 4.2.5.1 升級到 Rails 5.2.0 的環境時遭遇了兩個問題
bundler
>= 0.arvm
and bundler
gemrvm implode
rvm get head rvm reload rvm reset rvm use 2.4.1
rvm gemset create rails5.2.0
rvm use [email protected] --default
gem install bundler
which bundle
config/deploy.rb
content and hidden rvm_type
# set :rvm_type, :user
set :rvm_custom_path, '<PATHWHATYOUWANT>'
set :rvm_ruby_version, '[email protected]'
cap production bundler:install
rake
>= 12.3.1 whenbundle exec passenger-config restart-app <YOURAPP> --ignore-while-not-running
when deploy.rb
already have below setting:
set :passenger_restart_with_touch, false
set :passenger_in_gemfile, true
=> add config to deploy.rb :
set :passenger_restart_command, '-i passenger-config restart-app'