Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby /usr/local/rvm/bin/rvmshell:没有这样的文件或目录_Ruby_Ubuntu_Rvm_Capistrano - Fatal编程技术网

Ruby /usr/local/rvm/bin/rvmshell:没有这样的文件或目录

Ruby /usr/local/rvm/bin/rvmshell:没有这样的文件或目录,ruby,ubuntu,rvm,capistrano,Ruby,Ubuntu,Rvm,Capistrano,我有问题。我安装了rvm,但当我尝试cap deploy:setup时,我有: 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

我有问题。我安装了rvm,但当我尝试
cap deploy:setup
时,我有:

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

我曾尝试将
cd
发送到
/usr/local/rvm
,但我没有
这样的文件或目录。如何修复它?

正如@Strike3r所提到的,请遵循位于的文档并添加到您的
config/deploy.rb

before 'deploy:setup', 'rvm:install_rvm'
有几个例子,最有趣的

此处介绍了所有可用选项:

对我有用这就是在Ubuntu 12.04上对我有用的东西 使用以下命令在deploy.rb文件中设置默认shell:

set:default\u shell:bash

有选择地执行以下任务(仅举一个例子):

有关更多信息,请查看适用于我的

set :rvm_type, :user
在此之前,请检查您的rvm外壳在哪里。 在服务器上运行:

which rvm-shell 

如果您将看到类似/home/mihserf/.rvm/bin/rvmshell的内容,请尝试上述解决方案。

如果您正在使用add,则需要将
source/etc/profile.d/rvm.sh
添加到.bashrc文件的底部。

刚刚保存了我的baconI文件,然后执行了
sudo ln-s/usr/share/rvm//usr/local/rvm
set :rvm_type, :user
which rvm-shell