IIS上的Ruby on Rails?

我正在编写一个通常在Heroku或Linux Box上运行的Ruby on Rails应用程序,但我也需要将它部署到Windows Server。

服务器是安装了IIS 7.0的64位Win2008服务器,所以通常我更喜欢使用IIS而不是在它旁边设置Apache。

我只是不知道Ruby / Rails是否适用于IIS? gem有效吗? 64位是一个问题吗?

我正在考虑使用Ruby 1.9.1和Rails 2.3。

你必须喜欢疼痛,因为这种部署会受到伤害。 我不知道这是否适合您,但在我以前的工作中,我们在Windows平板电脑上安装了网络应用程序(超过200个)并决定使用虚拟机并在虚拟机中部署应用程序。 我们在没有iis的Windows上部署的PC平板电脑上的旧应用程序之一,只使用ruby和rubygems与mongrel作为app服务器和mysql作为数据库,但它不愉快。

要为IIS 7 64位Windows 2008 Server安装Ruby on Rails,请使用Helicon Zoo

微软的Web平台安装程序让这一切变得非常简单! 有关详细信息,请参见http://www.helicontech.com/articles/ruby-on-rails-on-windows-in-production/ 。

有一种方法可以通过HttpPlatformHandler在IIS8上运行RoR – Scott Hanselman在他的post中描述: 宣布:使用新的HttpPlatformHandler在IIS8上运行Ruby on Rails(或其他任何东西)

您可以在IIS下部署Rails,这非常困难,并且没有很多文档。 您需要一个特殊的Fast-CGI实现: http : //roriis.codeplex.com/

另请在此处提供信息: http : //mvolo.com/blogs/serverside/archive/2007/02/18/10-steps-to-get-Ruby-on-Rails-running-on-Windows-with-IIS-FastCGI。 ASPX

Windows上的Apache下的Rails稍微容易一些,但Windows部署的最大缺点是您无法使用Capistrano自动部署。 Gems适用于Windows。 我所有的经验都是32位,可能有64位相关的故障,但我对此表示怀疑。

对于使用RoR的Windows工作,我这样做:

1. Install Ruby and RoR 2. Install NginX (balancing for each thin server launched) 3. Install Thin Server 4. Create a service (on Ruby code) that run each thin server process with each affinity process (cpu0/cpu1...) for example if have a DualCore CPU it will launch 2 Thin Server (different port between those) and set affinity for each one (using PID). 5. Set a windows user with permission to do run that service (like a IIS pool and isolated process concept) 

我的应用程序连续工作超过一年,没有任何问题,我很高兴。