Reputation: 3149
I have the problem. I've installed rvm but when I try to cap deploy:setup
I have:
bash: /usr/local/rvm/bin/rvm-shell: No such file or directory
command finished in 244ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p0' -c 'mkdir -p /srv/xxx /srv/xxx/releases /srv/xxx/shared /srv/xxx/shared/system /srv/xxx/shared/log /srv/xxx/shared/pids'" on xxxxxxxx
I've tried to cd
to /usr/local/rvm
but I have No such file or directory
. How to fix it?
Upvotes: 3
Views: 10964
Reputation: 5335
If you are using the ubuntu rvm package add need to add source /etc/profile.d/rvm.sh
to the bottom of your .bashrc file.
Upvotes: 2
Reputation: 97
works for me:
set :rvm_type, :user
before it check where is your rvm-shell. run on server:
which rvm-shell
If you will see something like /home/mihserf/.rvm/bin/rvm-shell then try the solution pointed above.
Upvotes: 5
Reputation: 11
Setting the default shell in your deploy.rb file using:
set :default_shell, :bash
or selectively in your tasks like this (just an example):
namespace :deploy do
desc "Install stuff"
task :install do
run "#{sudo} apt-get -y update", :shell => "sh"
run "#{sudo} apt-get -y install python-software-properties build-essential, :shell => "sh"
end
end
For more info check the docs
Upvotes: 1
Reputation: 53178
as mentioned by @Strik3r follow documentation at https://github.com/wayneeseguin/rvm-capistrano#readme and add to your config/deploy.rb
:
before 'deploy:setup', 'rvm:install_rvm'
there are few examples available, most interesting https://github.com/wayneeseguin/rvm-capistrano#rvm--ruby-on-every-deploy
all the available options are described here: https://github.com/wayneeseguin/rvm-capistrano#options
Upvotes: 1