This is about configuring remote Ubuntu server through SSH utility for hosting Ruby on Rails application. From beginning I've installed all the environments using 'root' user, after installing tools I created other user - 'deploy' for Capistrano deployments. Now, when I connect to remote server with 'deploy' user account, for some reason it is showing '$ ruby -v' - 1.9.3
, but I have 2.3.0 installed. when I run '$ rvm list' - it shows correct version of the ruby installed and current, same as default set to 2.3.0. When I run '$ bash --login'
, than '$ ruby -v'
and '$ rvm list
' are both showing the right version of the Ruby, so there is another issue. I think it's because I installed ruby and RVM with 'root' user, but now trying to make deployment with 'deploy' user.
Also, during deployment of the ruby application, it shows error that RAKE gem is not installed. I know for sure that RAKE and other Gems are installed.
When logged in with deploy user credentials, the 'ruby -v'
shows 1.9.3, so I tried to call 'rvm use 2.3.0 --default'
but error is shown:
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
Thanks in advance for all your help.
As you've guessed, rvm
needs to be installed for the deploy
user. It's a per-user setting.
Edit: Problem already solved here