capistrano / rvm

MIT License
140 stars 47 forks source link

Feature/respect ruby version file #60

Open gucki opened 9 years ago

gucki commented 9 years ago
  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 commented 9 years ago

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
nijikon commented 9 years ago

When this will be merged?

nijikon commented 9 years ago

/cc @kirs

kirs commented 9 years ago

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

dmitry commented 8 years ago

What is left here?

akshah123 commented 8 years ago

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

Tuckie commented 8 years ago

Any updates on this?

thbar commented 7 years ago

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')
dmitry commented 3 years ago

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

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