I'm trying to deploy my local Rails app to my Digital Ocean VPS using the GoRails guide > https://gorails.com/deploy/ubuntu/14.04
But I'm running into a error when I want to deploy:
cap production deploy
[email protected]:~/sites/movieseat$ cap production deploy DEBUG[790313df] Running /usr/bin/env [ -d ~/.rbenv/versions/2.1.2 ] on 184.108.40.206 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 220.127.116.11: exit SystemExit: exit Tasks: TOP => rbenv:validate
I've found this topic > https://gorails.com/forum/ruby-issue-when-doing-cap-deploy-production 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:
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 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.