YogevAbr
YogevAbr

Reputation: 289

cap deploy - RVM not found

I get this log:

(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as 
[email protected]: rvm exit status: 127
rvm stdout: bash: /home/ubuntu/.rvm/bin/rvm: No such file or directory
rvm stderr: Nothing written


Caused by:
SSHKit::Command::Failed: rvm exit status: 127
rvm stdout: bash: /home/ubuntu/.rvm/bin/rvm: No such file or directory
rvm stderr: Nothing written

Tasks: TOP => rvm:check
(See full trace by running task with --trace)

After performing cap production deploy. The point is, that RVM is installed there, in the exact path it is looking for.

Please advice.

Upvotes: 1

Views: 1927

Answers (3)

Rabin Poudyal
Rabin Poudyal

Reputation: 778

This should work

set :rvm_custom_path, '/usr/share/rvm'
set :rvm_bin_path, '/usr/share/rvm/bin/rvm'

Upvotes: 3

bobomoreno
bobomoreno

Reputation: 2858

I had to do this in the end to resolve this (took hours):

ln -s /usr/share/rvm/bin/rvm .rvm/bin/rvm

Upvotes: 2

Peter P
Peter P

Reputation: 501

Probably you need to add rvm to PATH variable. Otherwise capistrano can not find it neither you can run it from CLI.

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export PATH

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

Add this lines in your home directory's .bashrc file. Make sure to restart the session or source .bashrc.

Upvotes: 0

Related Questions