Skip to content


Subversion checkout URL

You can clone with
Download ZIP


.ruby-version support #5

blackjid opened this Issue · 6 comments

4 participants


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,'.ruby-version').strip
@leehambley leehambley closed this

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.


Thanks @leehambley.

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.


Is there any particular reason that the gem itself is not trying to read .ruby-version as a default unless specifically overridden? It seems like ninety-nine percent of projects are going to have a .ruby-version in which case having to put a magic incantation (set :rbenv_ruby,'.ruby-version').strip) in every Capistrano configuration is backwards.

I’m happy to make a pull request for this but wanted to make sure there’s not a specific reason the gem isn’t doing it.


@codyrobbins you can read the particular reason in my comment above.

@kirs kirs locked and limited conversation to collaborators
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Something went wrong with that request. Please try again.