I'm not a windows user, and I've never deployed on windows. Made this small app for a company, and they want it deployed on one of their own servers - a windows server. I've installed this Rails Prod Win package. When browsing to http://localhost, I get the 500 error page from the .htaccess. This is what the apache error log says: http://pastie.caboo.se/58525 After googling around for a while, I found this small fcgi script to test if fcgi is working - http://pastie.caboo.se/58526 - and it is. Browsing to that file displays the stuff, and does the incremental count on each request. No clue at all about this pipe 1 stuff in the error messages. Anyone has a clue at all? I have absolutely no idea where to start, so _any_ help on this will be greatly appreciated.
on 2007-05-03 11:03
on 2007-05-03 16:16
Unless you have to, as in you have a gun to your head or I suppose an unreasonable client, I would recommend NOT deploying Rails via FCGI on Windows. We tried for a while and were never happy with either the ongoing management or reliability. I recommend the basic Rails deployment profile: Apache, mod_proxy_balancer, and Mongrel. Easy to setup and very reliable. There are a number of resources out there on how to set this up.
on 2007-05-03 16:39
+1. Mongrel can install as a service on Windows. There is no clustering support for Mongrel on Windows (though I hear it's coming...) and so you just install mongrel as a service once for each port. You can then use the mod_proxy_balance approach in Apache 2.2. I'll be talking about deployment on Windows at RailsConf apparently, so come see me if you're going :)
on 2007-05-03 17:11
I'll be attending your session, Brian, but primarily just to heckle and correct you. I should be easy to spot as I'll be the incredibly intelligent guy that impressed you so much. Or... uh... something like that. Thanks for your original documentation on deploying Rails on Windows, it was VERY helpful! As for the lack of Mongrel 'clustering' support... I wish the name would change as 'cluster' is far too overloaded a term, I prefer 'packs'. It's simply an issue of process management so a few batch files will do the trick. I have four batch files for the installation, removal, starting, and stopping of a Mongrel pack. Their contents are as follows: # # mongrel_install.bat # @echo off call mongrel_rails service::install -N <app name>-9000 -c <app path> - p 9000 -e production call mongrel_rails service::install -N <app name>-9001 -c <app path> - p 9001 -e production ... call mongrel_rails service::install -N <app name>-9016 -c <app path> - p 9016 -e production sc config <app name>-9000 start= auto sc config <app name>-9001 start= auto ... sc config <app name>-9016 start= auto # # mongrel_remove.bat # @echo off call mongrel_rails service::remove -N <app name>-9000 call mongrel_rails service::remove -N <app name>-9001 ... call mongrel_rails service::remove -N <app name>-9016 # # mongrel_start.bat # @echo off net start <app name>-9000 net start <app name>-9001 ... net start <app name>-9016 # # mongrel_stop.bat # @echo off net stop <app name>-9000 net stop <app name>-9001 ... net stop <app name>-9016
on 2007-05-03 17:49
Pretty much what I use, almost exactly. Would love to update my original documentation, but there's this book that's supposed to be coming out that contains the updates. I was just asked to present 2 days ago so please, no heckling. I'm nervous enough as it is. :)
on 2007-05-03 18:32
For some reason, using mongrel didn't even cross my mind. Trying that now. Managed to get mongler running on localhost:4000, all I need to figure out now is how to proxy it properly =) At the moment I'm getting 403 forbidden when doing ProxyPass / http://localhost:4000, not sure why that is. Going localhost/images/rails.png is working, so I guess I did something right. Thanks!
on 2007-05-03 18:34
Just in case someone is very bored today: http://pastie.caboo.se/58616
on 2007-05-03 19:36
This one is now working: <Proxy balancer://testapp> BalancerMember http://localhost:4000 </Proxy> <VirtualHost *:80> ServerAdmin firstname.lastname@example.org ServerName localhost ServerAlias localhost ProxyPass / balancer://testapp/ ProxyPassReverse / balancer://testapp/ </VirtualHost> Perhaps the previous one would work too. I got the same message first time I tried the above, but after actually checking the apache error logs (grats, me), it mentioned that mod_proxy needed some sub-modules to be loaded. So i uncommented all the LoadModule proxy_* modules. Again, thanks a lot!