Been playing with Ruby on Rails lately.
Actually have tried my hand on Curt Hibb's legendary
Rolling with Rails tutorial sometimes ago
while I am also playing with
Django, but stop playing with it for a while until last December I saved up enough to buy David Black "
Ruby for Rails"
Still have long way to go before finishing the book. But so far, I think this is quite a good book, not just for learning Rails, but also picking up Ruby, the language behind Rails.
I have tried to setup two environments for my rails adventure, one in Windows XP, and another in Fedora Core 6. There are tons of Tutorials online on how to setup RoR in XP and Fedora , so installing rail, creating a simple application, and then launching the rails apps with the standard WEBricks server shouldn't be that big a problem.
But as I tried to install
Mongrel as the web server instead in XP environment, even though there are instructions available in Mongrel as well as
Ruby on Rails HowTo on the installation, still there some surprises along the way.
From the Mongrel site, installation steps are as follow
- $ gem install win32-service (pick the most recent one)
- $ gem install mongrel (pick the win32 pre-built)
- $ gem install mongrel_service
But, somehow installing one gem will trigger for the message that another gem not listed above is needed. And installing that gem will trigger yet another gem. After a bit of wondering and googling around, I found some bits and pieces here and there, and manage to install mongrel eventually.
Here are the list of gems need to be installed, and in the listed sequence as well.
- fastthread-0.6.2-mswin32.gem This is not listed in the official mongrel instruction. Apparently, this is something to do with memory leak management. Here is the reason for this gem.
- gem_plugin-0.2.2.gem
- cgi_multipart_eof_fix-1.0.0.gem, this is related to DOS vulnerability, see here .
- mongrel-1.0.1-mswin32.gem
- win32-service-0.5.2-mswin32.gem
- mongrel_service-0.3.1-mswin32.gem
After installation, just start the rails application as usual, it will start with Mongrel by default. The sequence of rails looking for web servers is as below,
- Mongrel
- lighttpd
- WEBrick
If you happen to wanna tried out Rails with Mongrel in Windows, this list might save you a little bit of time.
Note: as pointed out by arjen, you could actually do a
gem install mongrel --include-dependencies
the installation will pretty much taking care of itself, but the thing is I am sitting behind a firewall, so have to do the gem installation manually, which lead to this rather messy situation.