Skip to main content
Ask A Question
You’re not receiving notifications from this thread.

rbenv: 2.1.2 is not installed or not found

Servers • Asked by Peter Boomsma

I'm trying to deploy my local Rails app to my Digital Ocean VPS using the GoRails guide >

But I'm running into a error when I want to deploy:

cap production deploy

Results in

[email protected]:~/sites/movieseat$ cap production deploy
DEBUG[790313df] Running /usr/bin/env [ -d ~/.rbenv/versions/2.1.2 ] on
DEBUG[790313df] Command: [ -d ~/.rbenv/versions/2.1.2 ]
DEBUG[790313df] Finished in 0.380 seconds with exit status 1 (failed).
ERRORrbenv: 2.1.2 is not installed or not found in ~/.rbenv/versions/2.1.2
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host exit

SystemExit: exit

Tasks: TOP => rbenv:validate

I've found this topic > which has the same issue, but the fix they use

set :rbenv_ruby, '2.1.2'

Doesn't work, because I allready state the following in my Capfile

require 'capistrano/rbenv'
set :rbenv_type, :user # or :system, depends on your rbenv setup
set :rbenv_ruby, '2.1.2'

Can someone point out what the problem is?


When I run:

which ruby

I get:


When I check my files I can go to /home/alucardu/.rbenv/versions/2.1.2, so it should all be there.


Looks like I was installing rbenv on my local server instead of my VPS. Doing that now.


Yup, quite stupid of me. Pretty much done now!

Haha, that would do it! I imagine that there are a few places where I could clean up the tutorial to show you on which machine to run which commands.

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 30,242+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.