Rails Nginx Unicorn Capistrano - 部署

时间:2015-03-26 06:05:18

标签: ruby-on-rails ubuntu nginx capistrano unicorn

我已经在这几个小时了,我无法弄清楚我做错了什么。我正在使用Ruby 2.1.5,Rails 4.2.0,Ubuntu 14.04服务器(在digitalocean上),以及其余的我的gemfile:

...
gem 'unicorn'
gem 'capistrano', '~> 3.4.0'
gem 'capistrano-rails', group: :development
gem 'capistrano-passenger'
...

我按照这两个教程中的配置说明操作:tutorial 1tutorial 2

他们必须有点过时,因为视频中的capistrano并不是说它需要capistrano-passenger,但在我的机器上它确实如此。我试着跑步。

但是,教程中的所有内容都工作正常,除了最后一个语句,使用此命令bin/cap production deploy部署服务器。我收到一条错误

cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@0.0.0.0: cp exit status: 1
cp stdout: Nothing written
cp stderr: cp: cannot stat ‘/opt/www/myapp/releases/20150326054249/public/assets/manifest*’: No such file or directory

SSHKit::Command::Failed: cp exit status: 1
cp stdout: Nothing written
cp stderr: cp: cannot stat ‘/opt/www/myapp/releases/20150326054249/public/assets/manifest*’: No such file or directory

Tasks: TOP => deploy:assets:backup_manifest
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@0.0.0.0: cp exit status: 1
cp stdout: Nothing written
cp stderr: cp: cannot stat ‘/opt/www/myapp/releases/20150326054249/public/assets/manifest*’: No such file or directory

由于我看过其他有类似说明的教程,我觉得它没事,我只是缺少一些小东西。

此外,它失败后,它以某种方式卸载capistrano。因为如果我再次尝试运行它,我会收到此错误:

cap aborted!
LoadError: cannot load such file -- capistrano/rails
/home/jeremy/421_WEBAPP/myapp/Capfile:6:in `require'
/home/jeremy/421_WEBAPP/myapp/Capfile:6:in `<top (required)>'
(See full trace by running task with --trace)

有人请求帮助,我再也不能把头发拉出来了

0 个答案:

没有答案