在 Windows Server 上托管 Ruby 应用程序是否可行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8729910/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is hosting a Ruby application on Windows Server a viable setup?
提问by Joe Schrag
I am starting a new web app project with the only real technology requirement being a host running Windows Server. I considered both ASP.NET MVC and Ruby On Rails. I would like to learn Ruby so I'm wondering of hosting it on a Windows platform is doable or if it will cause me more grief than it is worth. RailsInstaller made dev environment setup a snap, but I'm more worried about the production deployment.
我正在启动一个新的 Web 应用程序项目,唯一真正的技术要求是运行 Windows Server 的主机。我考虑过 ASP.NET MVC 和 Ruby On Rails。我想学习 Ruby,所以我想知道在 Windows 平台上托管它是否可行,或者它是否会给我带来更多的痛苦。RailsInstaller 使开发环境设置变得轻而易举,但我更担心生产部署。
The proposed setup is a Ruby on Rails application running on Windows Server 2003 (IIS) & driven by a SQL Server database. I know that will make many open source people cringe, but I am wondering how viable this is from a strictly practical standpoint. Or, if this is just a bad idea, what might be a better way to go? Also any other practical advice on technology choices for Ruby on Windows or deployment ideas would be helpful (best deployment package, should I be using JRuby, etc.).
建议的设置是运行在 Windows Server 2003 (IIS) 上并由 SQL Server 数据库驱动的 Ruby on Rails 应用程序。我知道这会让许多开源人员感到畏缩,但我想知道从严格的实践角度来看这有多可行。或者,如果这只是一个坏主意,那么更好的方法是什么?此外,关于 Ruby on Windows 的技术选择或部署想法的任何其他实用建议都会有所帮助(最佳部署包,我应该使用 JRuby 等)。
Thanks!
谢谢!
采纳答案by Charles Roper
Yes, it's viable. Check out some of these helpful resources and articles that offer a variety of ways to get started with Rails on Windows:
是的,它是可行的。查看这些有用的资源和文章,这些资源和文章提供了在 Windows 上开始使用 Rails 的各种方法:
- http://www.helicontech.com/zoo/
- http://vagrantup.com/
- http://www.engineyard.com/blog/2011/jruby-on-windows
- http://www.engineyard.com/blog/2011/jruby-win32ole-and-vagrant-on-windows
- http://railsinstaller.org/
- http://chocolatey.org/packages?q=ruby
- http://www.helicontech.com/zoo/
- http://vagrantup.com/
- http://www.engineyard.com/blog/2011/jruby-on-windows
- http://www.engineyard.com/blog/2011/jruby-win32ole-and-vagrant-on-windows
- http://railsinstaller.org/
- http://chocolatey.org/packages?q=ruby
As discussed in the JRuby on Windows article linked above, it's important that Windows developers get involved, so don't give up! Give it a go and share your experiences via a blog, here on SoF or on GitHub. When Rails was first born, deployment was a bit of a nightmare on any platform, so much so that entire bookswere written about it. Given the state of play now, and the obstacles that have been overcome through the sheer tenacity and ingenuity of the community, there's no reason why Ruby and Rails can't live and thrive on Windows.
正如上面链接的 JRuby on Windows 文章中所讨论的,Windows 开发人员的参与很重要,所以不要放弃!试一试,通过博客、SoF 或 GitHub 上的博客分享您的经验。当 Rails 刚诞生时,在任何平台上部署都是一场噩梦,以至于整本书都写了它。鉴于目前的发展状况,以及通过社区的顽强和独创性克服的障碍,Ruby 和 Rails 没有理由不能在 Windows 上生存和发展。
If you specifically want to seek out folks with lots of Ruby on Windows expertise, I'd highly recommend the RubyInstaller group. They're a really friendly, dedicated bunch.
如果您特别想寻找具有大量 Ruby on Windows 专业知识的人,我强烈推荐RubyInstaller 组。他们是一群非常友好、敬业的人。
You might also be in need of an editor for Windows. I personally use Sublime Text 2, but there are others that might take your fancy:
您可能还需要一个适用于 Windows 的编辑器。我个人使用 Sublime Text 2,但还有其他一些可能会让您喜欢:
回答by lbadura
If the marriage of Ruby/RoR and Windows is a must, I would recommend going with JRuby and an application server of preference (e.g. Tomcat). MRI based application on Windows might be a pain to maintain.
如果 Ruby/RoR 和 Windows 的结合是必须的,我会建议使用 JRuby 和首选的应用程序服务器(例如 Tomcat)。Windows 上基于 MRI 的应用程序可能很难维护。