CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Ben Reichelt's Weblog


Diamond in the rough: Installing Ruby on Rails with IIS



Comments

Sam said:

For testing and very low-volume sites, I wouldn't install a server at all. You can just use Ruby's Webrick (which is what you see in the demos when he types "script/server", though in windows it would be "ruby script/server" in your website's root).

We tried mightily for a few days and couldn't get RubyIIS to work. I'm fairly convinced the instructions floating around only work with an older version of ActionPack before some sort of change in the Routing (url-rewriting in Rails). I could be wrong of course, but I haven't seen any claims of success with any 0.13 or later Rails installs.

Apache is nice of course, but unless you're planning on public traffic, I wouldn't bother. You won't use it during development anyways. Who wants to restart Apache every time you change your environment.rb?

Still, getting Apache to work with Rails on Windows is pretty easy. Install Apache2. Install ruby-apache or whatever to get the ruby-mod-fcgi bindings. Setup your VirtualDirectory and start Apache.
# February 21, 2006 11:19 AM

breichelt said:

Yes, I can use WEBrick, which I have gotten to work and is fine for development, but I would still like to have a decent web server to host web sites if I want to expose them.

With WEBrick, I would have to run an instance of the server for each website, which I dont like and I dont know how performant it would be hosting multiple sites.
# February 21, 2006 11:40 AM

Sam said:

I see... well, that's basically how Apache w/ FastCGI works anyways. You'll have generally 4 or 5 fcgi processes spawn for each site. That's what DHH means when he talks about "easy scaling" since rails apps under fcgi already operate "clustered".

But if you want 'em public, I don't know that I'd trust Webrick from a security perspective. I don't know that it's insecure, but I don't know that it's stood up to any sort of formal testing either. So anyways, you're probably on the right track there... Apache on Windows is really your best bet if you don't have a *nix available. LightTPD if you do.

Or you could just not worry about it, and host with TextDrive or PlanetArgon. I host with TD and like 'em... the plans are reasonable, the SSH access is nice. The support turnaround is quick. They aren't too stable though. I find myself having to start my LightTPD server at least once a week and my cron job doesn't seem to run as scheduled. So that's definitely frustrating. If I had to do it again I'd probably go with PlanetArgon.
# February 21, 2006 2:27 PM

justin said:

You may want to take a look at InstantRails:

http://rubyforge.org/projects/instantrails/

Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all preconfigured and ready to run. No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment.
# February 21, 2006 5:30 PM

Baz said:

I wrote the tutorial you linked to - I occasionally got an "unable to connect to FastCGI server" when setting things up - it meant that FastCGI could not start Ruby and so terminated. That tended to be because the wrong parameters were being passed to Ruby (or, as I mentioned in the article, the session files were being produced in the wrong place).

I'm also working on an all-in-one installer - the first version will install your application with WEBrick as a Windows Service and ought to be ready for its first release in about a week. The next version will (hopefully) do a FastCGI IIS installation but that one depends upon one of my customers asking for it ...
# February 22, 2006 5:15 AM

breichelt said:

Justin, I saw the InstantRails project, I havent had a chance to try it out, but it seems odd. How can it run a web server and a db server without touching my environment?

Baz, thanks for the comment, I look forward to an installer. I will take another look at my setup and see if I can iron out the issues.
# February 22, 2006 4:50 PM
Check out Devlicio.us!