简体   繁体   English

通过capistrano部署到Rails生产时“出了问题”

[英]“Something went wrong” when deploying to Rails production via capistrano

The deployment succeeds, but every page has an error "something went wrong". 部署成功,但每个页面都有错误“出错”。

There is no error found in NGinx's log file, or the production log. 在NGinx的日志文件或生产日志中找不到错误。 In fact, the production log file isn't even written to after deployment. 实际上,生产日志文件甚至在部署后都没有写入。

I am using Rails 3.2 and the asset pipeline. 我正在使用Rails 3.2和资产管道。 The only thing I have found that fixes this is by logging into the server, running "rails s -e production", going to the official website www.myapp.com:3000, and then it loads fine. 我发现修复这个问题的唯一办法就是登录服务器,运行“rails s -e production”,进入官方网站www.myapp.com:3000,然后加载就好了。 After this the app works perfectly via passenger. 在此之后,该应用程序完美地通过乘客。

Its as if something is not being setup, that by running webrick on production just to load a single page, fixes it. 它似乎没有设置什么,通过在生产上运行webrick只是为了加载单个页面,修复它。 I have no idea what it could be! 我不知道它会是什么!

Any help? 有帮助吗?

It seems like you have not properly set up your production server. 您似乎没有正确设置生产服务器。 You need to point port 80 to your app (directory etc). 您需要将端口80指向您的应用程序(目录等)。 Please show us how you configured the passenger? 请告诉我们您如何配置乘客? More details would help identify the problem. 更多细节将有助于确定问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM