-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Can't deploy if you're using Rbenv locally #1104
Comments
One idea is trying what rvm-capistrano recommends:
Reading the code 🤓 , it appears that if it sees :local it checks if you're using rbenv, and finds the details it wants. If you're not using rbenv, if calls back to I'm going to open a PR for this. The other idea I had was pulling the value out of the .ruby-version file—but it seems much much preferable to integrate with rvm and do what it wants since that's what we're using in production. |
In rvm-capistrano, if you use the :local flag here, it will first check to see if you're using rbenv and detect the local ruby verion. If you're not using rbenv it falls back to expect rvm and uses the same statement I'm replacing here to detect the version. See this https://github.com/readly/rvm-capistrano/blob/master/lib/rvm/capistrano/base.rb#L77-L88 Fixes #1104
Upgrading this gem because we need the rbenv support added in rvm/rvm-capistrano@f3d25f1 Relates to #1104
Currently, with the version of Ruby (2.3.1) we're using, people (me) using rbenv can't deploy to production.
Here's how our capistrano config decides which ruby version to deploy with
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"")
https://github.com/openaustralia/planningalerts/blob/master/config/deploy.rb#L7The
ENV['GEM_HOME']
is the path where RubyGems/bundler keeps your ruby gems. Thegsub
extracts what it expects to be the current ruby version out of that path. The problem is that why that seems to work for where RMV keeps it's ruby gems, it doesn't work for where rbenv keeps them.Here's @henare’s description of the challenge:
The text was updated successfully, but these errors were encountered: