rvm icon indicating copy to clipboard operation
rvm copied to clipboard

Feature/respect ruby version file

Open gucki opened this issue 10 years ago • 9 comments

  1. Running cap staging rvm:check now always outputs something, not only when log_level is set to debug. It's now only automatically invoked on normal deploying if the log_level is debug, so no change in behavior here.
  2. 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.
  3. rvm_ruby_version is no longer set to default. Instead the ruby version reported by cap staging rvm:check is used by default now.

gucki avatar Nov 24 '14 11:11 gucki

I made some changes in the meanwhile:

  1. 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.
  2. The code now requires an sshkit version which has my command prefix proc support build in. See https://github.com/capistrano/sshkit/pull/194

gucki avatar Dec 02 '14 12:12 gucki

When this will be merged?

nijikon avatar Feb 17 '15 16:02 nijikon

/cc @kirs

nijikon avatar Feb 17 '15 16:02 nijikon

Looks nice, but I'd avoid calling Rake::Task from Capistrano extension since it may conflict with Rake.

kirs avatar Feb 17 '15 21:02 kirs

What is left here?

dmitry avatar Oct 25 '15 14:10 dmitry

:+1: would be great to have this merged in. At the present, it is very cumbersome to upgrade ruby versions.

akshah123 avatar Dec 10 '15 19:12 akshah123

Any updates on this?

Tuckie avatar Mar 16 '16 13:03 Tuckie

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')

thbar avatar Mar 16 '17 20:03 thbar

set :rvm_ruby_version, IO.read('.ruby-version').strip

I have new line on the end of the string, which is prevents from deployment.

dmitry avatar Jan 13 '21 16:01 dmitry