Alright – so there was a stupid software company. And they write in ASP.net and c# for web based apps. Ew.
So they said – we need a windows server that has 64 bits.
This server is also the server my company wants me to deploy my Ruby on Rails app onto, which is not fun.
First off its windows…and windows doesn’t always place nice unlike its friendly penguin counterpart…oh and this other company wanted everything running out of Microsoft SQL instead of MySQL…ew again.
So I complied and got my app switched to MsSQL (that’s a whole other post). And its nearly impossible to run a rails app behind another app that’s using IIS on a 64 bit machine (it requires $100 software and that’s another post too.)
Hokay so, turns out the other company’s program didn’t work and I got to remove it. Yay! Now I can use Mongrel instead of IIS…Yay! Well here’s the rub – turns out Mongrel wasn’t able to run as a service on 64 bit machine until one of the Mongrel guys figured it out about 6 weeks ago.
To get mongrel running you need to install the service with mongrel:service and but you have to include the FULL PATH to ruby.exe – then it works!
Ok great now I have some mongrels that run as service and startup when the server restarts. I decide to go with Pen for load balancing: easy and lightweight sounds great. So I try to install Pen as a service so I don’t have to login and run it everytime the windows server crashes and restarts (hopefully not ever but the gods are against me and I probably won’t be at this company to start the webservers up for them in the future).
No go with installing Pen as a service with the usual SrVany.exe route – maybe I just don’t know how to edit the registry correctly or setup SrVany on a 64 bit machine – but the usual route was giving me “service would not start promptly” error immediately when I press “start” under the services control panel.
Today I figured out a workaround – I used Scheduled Tasks to add a command prompt task every time the server starts. Then I changed the program from
c:\system\someDir\cmd.exe under advanced options to a .bat file that contained my startup script:
echo Start Pen for Mongrel Balancing
"d:\path\to\pen\pen.exe" -H 80 localhost:3000 localhost:3001 localhost:3002 localhost:3003
echo end of Batch file
I tested it and it works!