首次部署應用程序與Capistrano,但運行cap部署時出現問題:Rails 3.1.3,Capistrano 2.9.0,RVM 1.8.6上的更新任務和Ubuntu服務器10.10。就我所見,不應該是權限問題。現在一頭撞過我的頭,感謝任何方向。運行cap部署時的資產管道問題:Rails 3.1.3上的更新
[email protected]:~/Rails/testapp$ cap deploy:update
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote [email protected]_server:~/testapp/ HEAD"
[email protected]'s password:
command finished in 8892ms
* executing "git clone -q [email protected]_server:~/testapp/ /home/deploy/testapp/releases/20111211183654 && cd /home/deploy/testapp/releases/20111211183654 && git checkout -q -b deploy f473e207b15d73d2fa9aa32ab1dbeec98471153d && (echo f473e207b15d73d2fa9aa32ab1dbeec98471153d > /home/deploy/testapp/releases/20111211183654/REVISION)"
servers: ["my_server"]
Password:
[my_server] executing command
command finished in 1695ms
* executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* executing `deploy:assets:symlink'
* executing "rm -rf /home/deploy/testapp/releases/20111211183654/public/assets &&\\\n mkdir -p /home/deploy/testapp/releases/20111211183654/public &&\\\n mkdir -p /home/deploy/testapp/shared/assets &&\\\n ln -s /home/deploy/testapp/shared/assets /home/deploy/testapp/releases/20111211183654/public/assets"
servers: ["my_server"]
[my_server] executing command
command finished in 1117ms
* executing "chmod -R g+w /home/deploy/testapp/releases/20111211183654"
servers: ["my_server"]
[my_server] executing command
command finished in 614ms
* executing "rm -rf /home/deploy/testapp/releases/20111211183654/log /home/deploy/testapp/releases/20111211183654/public/system /home/deploy/testapp/releases/20111211183654/tmp/pids &&\\\n mkdir -p /home/deploy/testapp/releases/20111211183654/public &&\\\n mkdir -p /home/deploy/testapp/releases/20111211183654/tmp &&\\\n ln -s /home/deploy/testapp/shared/log /home/deploy/testapp/releases/20111211183654/log &&\\\n ln -s /home/deploy/testapp/shared/system /home/deploy/testapp/releases/20111211183654/public/system &&\\\n ln -s /home/deploy/testapp/shared/pids /home/deploy/testapp/releases/20111211183654/tmp/pids"
servers: ["my_server"]
[my_server] executing command
command finished in 1022ms
* executing "find /home/deploy/testapp/releases/20111211183654/public/images /home/deploy/testapp/releases/20111211183654/public/stylesheets /home/deploy/testapp/releases/20111211183654/pu## Heading ##blic/javascripts -exec touch -t 201112111837.12 {} ';'; true"
servers: ["my_server"]
[my_server] executing command
*** [err :: my_server] find:
*** [err :: my_server] "/home/deploy/testapp/releases/20111211183654/public/images"
*** [err :: my_server] : Filen eller katalogen finns inte
*** [err :: my_server]
*** [err :: my_server] find:
*** [err :: my_server] "/home/deploy/testapp/releases/20111211183654/public/stylesheets"
*** [err :: my_server] : Filen eller katalogen finns inte
*** [err :: my_server]
*** [err :: my_server] find:
*** [err :: my_server] "/home/deploy/testapp/releases/20111211183654/public/javascripts"
*** [err :: my_server] : Filen eller katalogen finns inte
*** [err :: my_server]
command finished in 1024ms
triggering after callbacks for `deploy:update_code'
* executing `deploy:assets:precompile'
* executing "cd /home/deploy/testapp/releases/20111211183654 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
servers: ["my_server"]
[my_server] executing command
*** [err :: my_server] sh:
*** [err :: my_server] rake: not found
*** [err :: my_server]
command finished in 1440ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deploy/testapp/releases/20111211183654; true"
servers: ["my_server"]
[my_server] executing command
command finished in 727ms
failed: "sh -c 'cd /home/deploy/testapp/releases/20111211183654 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'" on my_server
感謝您的回答,你是正確的,但它是一個RVM問題,但.bashrc中正在從.bash_profile中源了。 –