What can I use to host a Rails site on Windows?
Okay, before you guys go crazy - this is just a small site, temporary setup. Right now I have some internal people remote to the server and use the site via webrick via dev: ruby script / server command. Not really perfect.
I am just running Rails dev and I want to learn how best to handle hosting in a Windows Pro box. Again, just temporarily, please be careful :)
a source to share
As far as I know, mod_rails is not an alternative.
Mongrel plays great on windows, so you can set up multiple mongrels and have IIS or Apache proxy. Or just use Mongrel directly. Before mod_rails, mongrel was the de facto way to deploy on any platform, so it is a very viable choice.
Once I was forced to deploy to Windows, however I installed Ubuntu via virtualbox (you can also use VMWare or something else, of course) and deployed to it. Works like a dream and I have to work with a sane OS. Uf. SSH and more. I can’t live without him. Remote desktop isn't exactly what I do.
a source to share
Your best bet is to set up a Mongrel cluster. Mongrel is an application server that can serve a Rails application over HTTP. But one Mongrel instance can only handle one request at a time, so usually people start up a Mongrel cluster i.e. Multiple instances of Mongrel. These Mongrel instances do not talk directly to the Internet. Instead, they are put behind the load balancer or web server that the proxy is requesting this Mongrels cluster. If you are using Apache on Windows, you can: 1. Configure and start a Mongrels cluster, each listening on its own port. 2. Configure the virtual host with some mod_proxy_balancer directives, which will tell mod_proxy_balancer to proxy all Mongrel cluster requests. mod_proxy_balancer automatically balances the load between Mongrels.
a source to share
If the usage is really low, meaning there will probably be mostly 1 person at a time, or your response time is really low, then you can get away with one pooch and your users will point the browser there to the appropriate IP address and port.
For some time before I finally connected to our corporate Linux / apache cloud "cloud" (which was simple, but mostly due to internal IT reasons), I ran two applications on a workstation using separate mongrell (different ports) for each. It worked well enough to be useful for almost a year.
These days (well, about three weeks) I've replaced the immediacy, control, and vulnerability of local (under my desk) access for the stability of five servers, each with multiple mongrels, staging areas and annoying deployments. Swing and carousel.
a source to share