$rvm_path (/home/ubuntu/.rvm/) does not exist. error

Problem

When you want to use the capistrano recipe to deploy to a vagrant virtual box as described in ‘Deploying Rails’, and after you have corrected the rvm_path as described here, you get the following error message:

$rvm_path (/home/ubuntu/.rvm/) does not exist.

Solution

Make sure that after adding the rvm_path add also the following to the deploy.rb file, since rvm is installed system wide.

set :rvm_type, :system

Suggestion from here.

.rvm/bin/rvm-shell: No such file or directory error

Problem

When trying to set up the capistrano deploy recipe to deploy to the vagrant virtual box as described in ‘Deploying rails’, you get the error:

.rvm/bin/rvm-shell: No such file or directory

when you have installed rvm system wide on the virtual box.

Solution

Make sure that you add the following into your deploy.rb file to set up the path for rvm:

set :rvm_bin_path, "/usr/local/rvm/bin"

Solution taken from here