RoR 应用程序在混合开发中运行,但不在生产中运行
这是我第一次尝试 Ruby on Rails。刚刚向 Heroku 部署了一个非常简单的应用程序。
问题是我的应用程序在混合开发上完美运行;然而,当我使用“mongrel_rails start -e production”运行它时,我收到错误“我们很抱歉,但出了点问题”。
对于我的一生,我无法调试这个。 Heroku 日志没有返回任何内容,Heroku 中的 Exceptional 插件没有返回任何内容,并且我在 Windows 计算机上找不到 mongrel.log (当我使用 mongrel_rails start -e production -d 运行 mongrel 时,
我正在使用 Rails 2.3。 5 和 sqlite3 与捆绑器来打包我的 gems,
我被告知可能无法正确启动,
谢谢,
阿奈米
This is my first stab at Ruby on Rails. Just deployed a very simple app to Heroku.
The thing is that my app runs flawlessly on mongrel development; When I run it with "mongrel_rails start -e production" however, I get the error "We're sorry, but something went wrong."
For the life of me, I couldn't debug this. Heroku logs is not returning anything, the Exceptional addon in Heroku is not returning anything, and I cannot find mongrel.log on my Windows machine (when I run mongrel using: mongrel_rails start -e production -d"
I'm using Rails 2.3.5 and sqlite3 with bundler to pack my gems.
I was told that probably rails is not booting up correctly. I can't find any other way to diagnose this. Any ideas?
Thanks,
ANaimi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不确定这个问题是否得到了明确的回答,但是,请检查您的“%app_root%/config/environments/”文件夹,并将“development.rb”与“Production.rb”进行比较。
确保您在 production.rb 文件中拥有所有必要的设置 - 可能会遗漏其中的一些重要内容。
Not sure if this got definitively answered, however, check your '%app_root%/config/environments/' folder, and compare 'development.rb' to 'production.rb'.
Make sure that you have all necessary settings in the production.rb file - might have missed something important there.
查看您的 log/production.log 文件。其中应该包含有关正在发生的事情的详细信息。它通常包含一行,指定需要安装的 gem 的名称。
Heroku 不使用 mongrel,所以我假设这就是您想要弄清楚为什么当您将其推送到 heroku 时它不起作用的原因。
我发现,在大多数情况下,我的 Heroku 问题是因为未安装 gem。确保您创建了 gem 清单。
Take a look at your log/production.log file. That should contain detailed information about what's going on. It will usually contain a line that specifies the name of a gem that needs to be installed.
Heroku doesn't use mongrel, so I'm assuming that's what you're trying to do to figure out why it isn't working when you push it to heroku.
I've found, in most cases, my heroku problems have been because of uninstalled gems. Make sure you create a gem manifest.
尝试在启动时跟踪日志。从日志目录中的终端执行: tail -f *.log ,然后从另一个终端启动应用程序(可能是development.log,因为您可能正在开发模式下运行。)
Try tailing logs while booting up. From the terminal in the log directory do: tail -f *.log and then launch the app from another terminal (likely it's development.log since you're probably running in development mode.)