Heroku、Thin 以及介于两者之间的一切
查看日志,我的 cedar 应用程序当前运行 webrick。显然,这不是生产应用程序的最佳选择。
正如网上所指出的,我应该使用瘦网络服务器。
但我仍然想在我的开发机器(Windows)上使用 webrick 的简单性。
正如 Heroku cedar stack、thin 和 eventmachine 的评论中所述,该版本可以在windows上安装eventmachine(我还需要对该gem的一些解释)是1.0.0.beta4,而heroku不喜欢这样..
我如何仅安装thin(和我猜的eventmachine)在heroku上并保留webrick来满足我所有的本地主机需求?
什么是 eventmachine,为什么我需要它?
有没有办法明确告诉heroku忽略我想要的内容并使用thin?
Looking at the logs, my cedar app currently runs webrick. Obviously, this is not the best choice for production app.
As noted all over the web, I should use Thin webserver.
But I would still like to use the simplicty of webrick on my development machine (windows).
As noted in the comments on Heroku cedar stack, thin and eventmachine the version that can be installed on windows for eventmachine (I also need some explanation on that gem) is 1.0.0.beta4 and heroku doesn't like that..
How do I install thin (and eventmachine I guess) only on heroku and keep webrick for all my localhost needs?
What is eventmachine and why do I need it?
Is there a way to explicitly tell heroku to ignore what I want and use thin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在您的
Gemfile
中,创建或更改product
组以包含thin
:然后,在您的 Procfile(一个名为
Procfile
的文件放置在应用程序的根目录中),告诉 Heroku 您想要使用thin
,像这样:这将允许你继续在本地开发环境中使用 Webrick,同时在 Heroku 上的生产中运行
thin
。In your
Gemfile
, create or change theproduction
group to includethin
:Then, in your Procfile (a file named
Procfile
placed in the root of your app), tell Heroku you want to usethin
, like so:That will allow you to keep using Webrick in your local development environment while running
thin
in production on Heroku.为了跳过在本地计算机上安装
thin
gem,请像这样调用捆绑器:In order to skip installation of
thin
gem on your local machine, call bundler like this: