/usr/local/rvm/bin/rvm-shell: No such file or directory

走远了吗. 提交于 2019-12-11 03:46:57

问题


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?


回答1:


set :default_shell, "/bin/bash -l"

works for me




回答2:


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.




回答3:


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




回答4:


This is what worked for me on Ubuntu 12.04

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




回答5:


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.



来源:https://stackoverflow.com/questions/16711361/usr-local-rvm-bin-rvm-shell-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!