rvm
rvm copied to clipboard
Feature/respect ruby version file
- Running
cap staging rvm:check
now always outputs something, not only whenlog_level
is set todebug
. It's now only automatically invoked on normal deploying if thelog_level
isdebug
, so no change in behavior here. -
cap staging rvm:check
is now executed in the current release path, so RVM will pickup any.ruby-version
file and only fall back to the system defaults. -
rvm_ruby_version
is no longer set todefault
. Instead the ruby version reported bycap staging rvm:check
is used by default now.
I made some changes in the meanwhile:
- The ruby version is now redetected after the repository has been checked out. This is important when new version of the application has a different ruby version than the current release.
- The code now requires an sshkit version which has my command prefix proc support build in. See https://github.com/capistrano/sshkit/pull/194
When this will be merged?
/cc @kirs
Looks nice, but I'd avoid calling Rake::Task
from Capistrano extension since it may conflict with Rake.
What is left here?
:+1: would be great to have this merged in. At the present, it is very cumbersome to upgrade ruby versions.
Any updates on this?
FWIW, today capistrano/rvm
still prefixes with rvm default do
by default, which can be problematic (e.g. if you use both JRuby & MRI on a server setup, if you plan major Ruby + code upgrades etc).
As I mentioned in #59, I found that just using this works nicely:
set :rvm_ruby_version, IO.read('.ruby-version')
set :rvm_ruby_version, IO.read('.ruby-version').strip
I have new line on the end of the string, which is prevents from deployment.