I upgraded my Rails project Gemfile to use Ruby version 2.2.1
However when I try to do
cap production deploy
I get the error message:
ERROR rbenv: 2.2.1 is not installed or not found in $HOME/.rbenv/versions/2.2.1
Does anyone have experience with this issue? I’m not sure I have to upgrade Ruby manually on the production server, or if this is handled by capistrano-rails
@acandael are you running cap on your production server? From the error message, it looks like the machine (or the particular account on the machine) doesn’t have that version of Ruby. If you can open a shell on the server, I would use rbenv versions to get the list of versions. Make sure you’re doing this as the same user that Capistrano uses to do deployments.
If you’re using ruby-build with rbenv, you’ll need to update your version listings by updating ruby-build with apt. I would be very surprised if apt doesn’t have newer versions. I’d try updating your package listings in apt and then upgrading rbenv and ruby-build.
I was able to install Ruby 2.2.1 on the server and set it as the global version with
rbenv global 2.2.1
If I run
cap production deploy
Everything seems to start out fine, but suddenly I get the error:
DEBUG [47dbc416] rbenv: bundle: command not found
DEBUG [47dbc416]
DEBUG [47dbc416] The `bundle' command exists in these Ruby versions:
DEBUG [47dbc416] 2.1.3
it seems like the bundle command only exists for the previous ruby version.