应用程序已成功部署,但无法运行!
/var/log/nginx/error.log
处的错误文件显示以下错误:
2014/07/27 13:01:33 [crit] 13633#0: *531 connect() to unix:/srv/www/webcam_app/shared/sockets/unicorn.sock failed (2: No such file or directory) while connecting to upstream, client: 172.31.21.187, server: webcam_app, request: "GET / HTTP/1.1", upstream: "http://unix:/srv/www/webcam_app/shared/sockets/unicorn.sock:/", host: "172.31.0.13"
我检查并发现unicorn.conf
在/srv/www/webcam_app/shared/sockets
中不存在。
我无法弄清楚为什么会发生这种情况。我是否需要为 unicorn 添加任何 gem ,这是否是食谱的某种问题?
最佳答案
添加
# Use unicorn as the web server
gem 'unicorn'
到 Gemfile 解决了问题。
关于ruby-on-rails - 使用 unicorn 将 Rails 应用程序部署到 Opsworks 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24981295/