You can clone with
Hey, I'm trying to use cap v3, with capistrano-rbenv but I get "rbenv: rbenv_ruby is not set"
I haven't set the rbenv_ruby variable because I already have a .ruby-version file in my proyect that define the ruby version. So I don't want to repeat that information in two locations.
Does capistrano-rbenv supports .ruby-version files to get the version in any wat?
Does it make any sense?? If it doesn't support and it make sense I can to make a PR providing that functionality…..
If you can guarantee that rvm is loaded into the environment, the you don't need the capistrano-rvm integration. However as the environment doesn't get loaded (by design) in Capistrano, you'll need to specify your ruby version.
I'd suggest an easy work around as:
set :rbenv_ruby, File.read('.ruby-version').strip
When I was working on this project, I thought it would be more verbose to set ruby version in deploy.rb instead of .ruby-version.
If you still want to get ruby version from file, @leehambley's snippet is the best way to do that.
Just to be sure. When you were talking about rvm and capistrano-rvm integration, you meant rbenv and capistrano-rbenv integration, right?
I might have mixed up rbenv, rvm - but the concepts are the same.