I'm getting an rbenv: 2.3.1 is not installed or not found in $HOME/.rbenv/versions/2.3.1
when trying to deploy to Digital Ocean with Capistrano.
Does rbenv look on my local machine or on the DO droplet for the ruby version?? Or both for that matter...
The output on DO for which ruby
is `/home/deploy/.rbenv/shims/ruby
The output on DO for ruby -v
is ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
...so it looks like I have ruby installed correctly but it just isn't recognising it??
In my Capfile I have
require 'capistrano/rbenv'
set :rbenv_type, :user # or :system, depends on your rbenv setup
set :rbenv_ruby, '2.3.1'
I'm following the guide on GoRails.
This SO question suggests that ruby should be installed on the root user. In my case I have installed it as user deploy
.
rbenv: ruby-3.0.2 is not installed or not found in /home/deploy/.rbenv/versions/ruby-3.0.2 on 10.0.2.206
but on server I've installed ruby withdeploy
user andwhich ruby
returns/home/deploy/.rbenv/shims/ruby
. Mydeploy.rb
hasset :rbenv_path, '/home/deploy/.rbenv
– Ina