我应该放弃在 Windows 下部署 Rails 吗? [英] Should I give up on deploying Rails under Windows?

查看:32
本文介绍了我应该放弃在 Windows 下部署 Rails 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行了一个由另一个团队开发的 rails 应用程序实例.回到我开始时,部署 Rails 应用程序的常用方法是在 Apache 后面使用 Mongrel,这是该团队用于自己实例的配置.由于我是 Windows 人员,而且 Apache 和 Mongrel 都可以轻松设置为 Windows 服务,因此我使用了(虚拟)Windows 框并在那里设置了所有内容.

I run an instance of a rails application that is developed by another team. Back when I started, the common way to deploy Rails apps was to use Mongrel behind Apache, and that's the configuration that that team used for their own instances. Since I'm a Windows guy, and since both Apache and Mongrel can easily be set up as Windows services, I used a (virtual) Windows box and set up everything there.

我猜自从 Rails 领域发生了变化.Mongrel 停滞不前(至少这是我对普遍看法的印象).开发我的应用程序的团队不久前已改用 mod_rails.我并不关心这一切,因为我的 Mongrel 设置继续工作,直到我最后一次与他们的代码同步.显然,他们在创建服务"模型时存在名称冲突,该模型与 mongrel_service 中的模块名称发生冲突(请参阅 http://aspn.activestate.com/ASPN/Mail/Message/ruby-rails/3497181).当我要求他们重命名模型时,他们说他们对支持 Mongrel 不感兴趣.

I guess since than things changed in Rails land. Mongrel has stagnated (at least that's my impression of the common perception). The team developing my app has switched to using mod_rails a while back. I have not concerned myself with all this, since my Mongrel setup continued to work, until the last time I synced with their code. Apparently, there's a name conflict where they created a 'Service' model, which clashes with a module name in mongrel_service (see http://aspn.activestate.com/ASPN/Mail/Message/ruby-rails/3497181 ). When I asked them to rename the model, they said they're not interested in supporting Mongrel.

Mongrel 仍然是 Rails 应用程序的有效选项吗?如果没有,是否有在 Windows 下部署的有效替代方案?mod_rails 和 Thin 都不能在 Windows 下运行……还是我应该咬紧牙关,放弃 Windows 部署,将我的 VM 重建为 Linux 机器?

Is Mongrel still a valid option for Rails applications? If not, is there a valid alternative for deploying under Windows? Neither mod_rails nor Thin run under Windows... Or should I just bite the bullet, give up on Windows deployment, and rebuild my VM as a Linux box?

澄清:运行它的虚拟机不在我的开发桌面上.它是我们 IT 部门托管的 VM,用于生产.我有管理员.如果必须的话,我可以让 IT 部门设置 Linux VM.

To clarify: The VM where this runs is not on my development desktop. It's a VM that our IT department hosts, used in production. I have admin on it. I can get IT to set up a Linux VM instead if I must.

推荐答案

这并不能直接回答您的问题,但就我个人而言,我会咬紧牙关转向 Linux,安装 Apache 和 Passenger 并像这样继续下去.安装 Ubuntu Server 并安装上述内容是一种非常轻松的体验,您最多应该在一两个小时内启动并运行.

This doesn't directly answer your question but personally I'd bite the bullet and move to Linux, install Apache and Passenger and go with it like that. Installing Ubuntu Server and installing the aforementioned is a pretty painless experience and you should be up and running within an hour or two at most.

过去,这是我使用过的方法,如果您对 Linux 和/或 Apache 没有太多/任何经验,那么唯一的障碍就是学习曲线.可能值得一看 "Linux for Softies" 系列TekPub 介绍了如何设置此堆栈.

In the past, this is the approach I've used and really the only barrier to this would be the learning curve if you don't have much/any experience with Linux and/or Apache. It might be worth checking out the "Linux for Softies" series on TekPub which cover setting up this very stack.

这篇关于我应该放弃在 Windows 下部署 Rails 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆