lee*_*our 2 ruby capistrano ruby-on-rails
我正在尝试使用Capistrano 2.15.5将Rails 3.2应用程序部署到Ubuntu 13.04.成功后cap deploy:setup,Capistrano失败cap deploy:cold了:
failed: "sh -c 'ls /srv/www/application/shared/assets/manifest*'"
我正在部署预编译资产,其中manifest.yml存在于public/assets中.
失败任务的完整输出:
triggering after callbacks for `deploy:update_code'
* 2013-11-24 23:06:43 executing `deploy:assets:precompile'
triggering before callbacks for `deploy:assets:precompile'
* 2013-11-24 23:06:43 executing `deploy:assets:update_asset_mtimes'
* executing "[ -e /srv/www/application/shared/assets/manifest* ] && cat /srv/www/application/shared/assets/manifest* || echo"
servers: ["1.1.1.1"]
[1.1.1.1] executing command
command finished in 443ms
* executing "cd -- /srv/www/application/releases/20131124190639 && RAILS_ENV=production RAILS_GROUPS=assets #<Capistrano::Configuration::Namespaces::Namespace:0x007f66b2e9a898> assets:precompile"
servers: ["1.1.1.1"]
[1.1.1.1] executing command
command finished in 439ms
* executing "ls -1 /srv/www/application/shared/assets/manifest* | wc -l"
servers: ["1.1.1.1"]
[1.1.1.1] executing command
command finished in 569ms
* executing "ls /srv/www/application/shared/assets/manifest*"
servers: ["1.1.1.1"]
[1.1.1.1] executing command
command finished in 575ms
*** [deploy:update_code] rolling back
* executing "rm -rf /srv/www/application/releases/20131124190639; true"
servers: ["1.1.1.1"]
[1.1.1.1] executing command
command finished in 458ms
failed: "sh -c 'ls /srv/www/application/shared/assets/manifest*'"
Run Code Online (Sandbox Code Playgroud)
我如何解决它?
问题出在
executing "cd -- /srv/www/application/releases/20131124190639 && RAILS_ENV=production RAILS_GROUPS=assets #<Capistrano::Configuration::Namespaces::Namespace:0x007f66b2e9a898> assets:precompile"
Here Capistrano rake用命名空间对象替换.这是因为我:rake在部署文件中创建了一个命名空间.不知道它可能导致这样的错误.重命名命名空间解决了这个问题.