我正在迁移几年前创建的 Rails 应用程序,并且很长时间没有将其部署到新服务器上。当时,我使用 capistrano 没有问题,现在,当我运行cap deploy时,以下步骤失败:
* executing "ls -1 /home/deploy/mywebsite.com/shared/assets/.sprockets-manifest* | wc -l"
servers: ["45.79.142.32"]
[45.79.142.32] executing command
command finished in 727ms
* executing "ls /home/deploy/mywebsite.com/shared/assets/.sprockets-manifest*"
servers: ["45.79.142.32"]
[45.79.142.32] executing command
command finished in 783ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deploy/mywebsite.com/releases/20150812101128; true"
servers: ["45.79.142.32"]
[45.79.142.32] executing command
command finished in 944ms
failed: "rvm_path=/home/deploy/.rvm /home/deploy/.rvm/bin/rvm-shell 'ruby-2.2.2' -c 'ls /home/deploy/mywebsite.com/shared/assets/.sprockets-manifest*'" on 45.79.142.32
我在几个地方读到了有关 sprockets 更改清单文件名或类型(从 .sprockets-manifest 到 .manifest 或其他东西)的信息,但我不知道如何以一种不是黑客的方式解决它。我不确定这是否是由于使用旧的 Rails 版本或其他原因。这是我正在使用的版本:
- 红宝石 2.2.2
- 导轨 3.2.14
- Capistrano 2.15.6(带有 Rvm/capistrano)
- 链轮 2.2.1