简体   繁体   中英

cap deploy setup error - no directory for rvm-shell

I have a rookie question, I am new to server deployment on rails. The current set up is Nginx and unicorn, with Rails 4.0.0 and Ruby 2.0.0-p247.

I run into problem when I try to use capistrano to deploy the rails app to a remote VPS. I followed RailsCast http://railscasts.com/episodes/335-deploying-to-a-vps and have everything ready. 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 . 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 ..

Help is needed! Thanks!

You can set the environment in your deploy.rb:

set :default_environment, {

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

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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