Deploying on windows 2000 server

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
I get the 500 error page from the .htaccess. This is what the apache
error log says:

After googling around for a while, I found this small fcgi script to
test if fcgi is working - - 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.

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.

Mongrel can install as a service on Windows. There is no clustering
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
see me if you’re going :slight_smile:

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:


@echo off
call mongrel_rails service::install -N -9000 -c -
p 9000 -e production
call mongrel_rails service::install -N -9001 -c -
p 9001 -e production

call mongrel_rails service::install -N -9016 -c -
p 9016 -e production

sc config -9000 start= auto
sc config -9001 start= auto

sc config -9016 start= auto


@echo off
call mongrel_rails service::remove -N -9000
call mongrel_rails service::remove -N -9001

call mongrel_rails service::remove -N -9016


@echo off
net start -9000
net start -9001

net start -9016


@echo off
net stop -9000
net stop -9001

net stop -9016

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.


Pretty much what I use, almost exactly. Would love to update my
documentation, but there’s this book that’s supposed to be coming out
contains the updates.

I was just asked to present 2 days ago so please, no heckling. I’m
enough as it is.


Just in case someone is very bored today:

This one is now working:

<Proxy balancer://testapp>
BalancerMember http://localhost:4000

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName localhost
ServerAlias localhost
ProxyPass / balancer://testapp/
ProxyPassReverse / balancer://testapp/

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!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs