简体   繁体   English

cap deploy安装程序错误-rvm-shell没有目录

[英]cap deploy setup error - no directory for rvm-shell

I have a rookie question, I am new to server deployment on rails. 我有一个菜鸟问题,我是Rails服务器部署的新手。 The current set up is Nginx and unicorn, with Rails 4.0.0 and Ruby 2.0.0-p247. 当前设置是Nginx和unicorn,以及Rails 4.0.0和Ruby 2.0.0-p247。

I run into problem when I try to use capistrano to deploy the rails app to a remote VPS. 当我尝试使用capistrano将Rails应用程序部署到远程VPS时遇到问题。 I followed RailsCast http://railscasts.com/episodes/335-deploying-to-a-vps and have everything ready. 我关注了RailsCast http://railscasts.com/episodes/335-deploying-to-a-vps并准备了一切。 When I do: 当我做:

cap deploy:setup

The following error happened: 发生以下错误:

 * executing "mkdir -p /var/www/blog /var/www/blog/releases /var/www/blog/shared /var/www/blog/shared/system /var/www/blog/shared/log /var/www/blog/shared/pids"
servers: ["123.123.123.123"]
[123.123.123.123] executing command
** [out :: 123.123.123.123] env:
** [out :: 123.123.123.123] /root/.rvm/bin/rvm-shell
** [out :: 123.123.123.123] : No such file or directory
....
failed: "env PATH=/usr/local/rvm/bin rvm_path=/usr/local/rvm/bin rvm_path=$HOME/.rvm $HOME/.rvm/bin/rvm-shell 'default' -c 'mkdir -p /var/www/blog /var/www/blog/releases /var/www/blog/shared /var/www/blog/shared/system /var/www/blog/shared/log /var/www/blog/shared/pids'" on 123.123.123.123

When I check with which rvm-shell , I got /usr/local/rvm/bin/rvm-shell . 当我检查which rvm-shell ,我得到了/usr/local/rvm/bin/rvm-shell I wonder why the script would try to find in /root/.rvm/bin/rvm-shell .. But I don't know how to let the deployment script find the rvm-shell .. 我不知道为什么该脚本会尝试在/root/.rvm/bin/rvm-shell找到..但是我不知道如何让部署脚本找到rvm-shell ..

Help is needed! 需要帮助! Thanks! 谢谢!

You can set the environment in your deploy.rb: 您可以在deploy.rb中设置环境:

set :default_environment, { 设置:default_environment,{

'PATH' => "/usr/local/rvm/bin/rvm-shell:/xxx/xxx"

} }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM