All threads / rbenv: 2.1.2 is not installed or not found
Ask A Question


You’re not receiving notifications from this thread.

rbenv: 2.1.2 is not installed or not found

Peter Boomsma asked in Servers

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

alucardu@alucardu-VirtualBox:~/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.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 54,919+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.