I'm writing a Ruby on Rails app that normally runs on Heroku or a Linux Box, but I'd need to deploy it to a Windows Server as well.
The Server is a 64-Bit Win2008 Server with IIS 7.0 installed, so normally I'd prefer using IIS instead of setting up an Apache next to it.
I j开发者_Python百科ust don't know if Ruby/Rails works with IIS? Do Gems work? Is 64-Bit an issue?
I'm thinking of using Ruby 1.9.1 and Rails 2.3.
To install Ruby on Rails for IIS 7 64-Bit Windows 2008 Server please use Helicon Zoo
you must like pain because this deployment is going to hurt. I don't know if this is a solution for you, but at my old job we were deploying web apps on windows tablets (over 200 of them) and decided to use virtual box and deploy the app in the vm. One of our old apps on the pc tablets we deployed on windows without iis, just using ruby and rubygems with mongrel as the app server and mysql as the database but it was not pleasurable.
Microsoft's Web Platform Installer makes it all surprisingly easy! See http://www.helicontech.com/articles/ruby-on-rails-on-windows-in-production/ for details.
There is a way to run RoR on IIS8 via HttpPlatformHandler - described by Scott Hanselman in his post: Announcing: Running Ruby on Rails on IIS8 (or anything else, really) with the new HttpPlatformHandler
You can deploy Rails under IIS, it's just very difficult and there's not a lot of documentation. You'll need a special Fast-CGI implementation: http://roriis.codeplex.com/
Also info here: http://mvolo.com/blogs/serverside/archive/2007/02/18/10-steps-to-get-Ruby-on-Rails-running-on-Windows-with-IIS-FastCGI.aspx
Rails under Apache on Windows is a bit easier, but the biggest drawback of a Windows deployment is that you can't use Capistrano to automate deployments. Gems work on Windows. All my experience is 32bit, there might be a 64bit related glitch, but I doubt it.
For work in windows with RoR I do this:
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)
My app is working more than one year continuous and not have any problem with that and I'm Happy.
精彩评论