在 Rails 开发模式下使用 WEBrick 有什么优势吗?
我在 Mac 上进行开发,并且我很乐意设置安装了 Apache 的 Ubuntu VM,因此“您不需要安装 Apache”并不是真正的原因。无论如何,我都是从虚拟机运行 Ruby,所以所需的系统资源似乎没有太大差异。
在我看来,使用 Apache 的优点是它与我的生产服务器的性能更加一致。
那么使用 WEBrick 的理由是什么?它是否使开发变得更容易?
I develop on a Mac, and I'm pretty comfortable setting up an Ubuntu VM with Apache installed, so "you don't need to install Apache" is not really a reason. I run Ruby from the VM anyway, so there doesn't seem to be much difference in system resources needed.
In my head, the advantage of using Apache is that it's going to perform more consistently with my production server.
So what reasons are there to use WEBrick? Does it make development easier somehow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,没有任何优点。唯一的“优点”是它是预先捆绑的网络服务器,所以你至少“有一些东西”
我相信大多数经验丰富的 Ruby 开发人员都会使用其他东西,比如 Thin、mongrel、unicorn、pow、passenger 等......
No there are no advantages. The only "advantage" is that it is the pre-bundled webserver so you at least "have something"
I'm sure most experienced Ruby devs use something else like thin, mongrel, unicorn, pow, passenger, etc...
我会选择 phusion乘客+乘客偏好窗格: http ://www.fngtps.com/2008/06/putting-the-pane-back-into-deployment
太棒了。这样我就可以更像生产服务器,并在添加新项目等时轻松起来。
I'd go for phusion passenger + passsenger pref pane: http://www.fngtps.com/2008/06/putting-the-pane-back-into-deployment
Awesomeness. This way I can act more like the production server and take it easy when adding new projects etc.
我一直在学校项目中使用 Rails,当我试图弄清楚服务器正在做什么时,我发现彩色日志很有帮助。当然你可以
tail -f
apache 日志,但在我看来,颜色很好。I've been using Rails for a school project, and I find the colorized logs helpful when I'm trying to figure out what the server is doing. Sure you could
tail -f
the apache logs, but color is nice IMO.