Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/respect ruby version file #60

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

gucki
Copy link

@gucki gucki commented Nov 24, 2014

  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.

on primary(:app) do
within release_path do
ruby_version = capture(:rvm, "current")
# FIX ME: when calling `set :rvm_ruby_version, ruby_version` here directly
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anybody has an idea on how to improve on this here? Thanks 👍

@gucki
Copy link
Author

gucki commented Dec 2, 2014

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 Added support for procs to command prefixes sshkit#194

@nijikon
Copy link

nijikon commented Feb 17, 2015

When this will be merged?

@nijikon
Copy link

nijikon commented Feb 17, 2015

/cc @kirs

@kirs
Copy link
Member

kirs commented Feb 17, 2015

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

@dmitry
Copy link

dmitry commented Oct 25, 2015

What is left here?

@akshah123
Copy link

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

@Tuckie
Copy link

Tuckie commented Mar 16, 2016

Any updates on this?

@thbar
Copy link

thbar commented Mar 16, 2017

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
Copy link

dmitry commented Jan 13, 2021

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants