DailyKos considers Ruby on Rails

Earlier this week, Hunter, uber technocrat at DailyKos.com started talking about how they will build the next version of DailyKos. The discussion has been going for a day or two now with over 700 comments as I write this.

While DailyKos is the highest-traffic political blog in the US, I don’t think it’s particularly newsworthy that they are considering Rails. In fact, I think it’s quite the opposite. What I do find interesting is the evolving discussion about the choices. Hunter essentially set out Perl/mod_perl, Python/Django and Ruby/Rails as the main choices. What people have to say about the differences and why they would choose one over the others makes for some really I-should-have-been-in-bed-an-hour-ago reading. Some of what people think they know about Ruby and Rails seems to be out of date or otherwise misinformed, but there are some good arguments on all sides.

If you are gearing up to have a conversation with management about picking Rails for a big project, take a read to see in one place all the arguments you will have to deal with!

Rails 1.2: Release Candidate 2

This is it. We’re a mere two shakes of a lamb’s tail from releasing the final version of Rails 1.2. But before we light the fireworks and pop the champagne, we’ll just do one itsy, bitsy, tiny test run. Like wearing protection glasses in downtown Copenhagen on New Year’s. You know, just for precautions.

So please do give it a good run. We’re looking for STOP THE BOAT and HOLD THE PRESSES kind of issues for this one. Nothing else will stop it (but please do report every thing you find any way).

For a reminder on how to install and what’s new, see the release notes for Release Candidate 1. We also did a series of highlights for Active Record, Action Pack, and Active Support. Read those and hold your breath in anticipation. Unless a surge of heinous issues appear, we’re expecting the final version to land some times next week.

Yay, hurray!

Using custom mime types

So, you’ve started using Rails’ new mime type support with responds_to, but you were wondering how to add your own custom types? Luckily, Geoffrey Grosenbach (aka topfunky) is there to show you the way. His example involves registering an extension for .png, and generating a custom icon for an order in his shopping cart with some RMagick-fu. His example looks something like this:

Mime::Type.register "image/png", :png

# then in your controller action
def show
  respond_to do |format|
    format.html { }
    format.png { }

Mime::Type.register will add the image/png mime type to the collection of mime types, bind it to the .png extension. It also creates a special Mime::Type instance at Mime::PNG. Check out the great post and the comments for more tips on caching and RMagick.

Note: After some investigation, I’ve found that using Geoff’s :format hack is not required on Rails 1.2 if you make the request with the :format parameter. Using routes like formatted_post_path(@post, :xml) will give you a path like “/posts/1.xml”. Accessing that will write public/posts/1.xml, regardless of what the page_cache_extension is.

A brief introduction to Active Resource

Rick Olson is getting jiggy with Active Resource these days and decided to spread the love with a brief introduction to the newest member of the Rails framework family. He takes you through how to use ARes as a client for the Beast forum in a few simple steps. Get your REST face on and enjoy.

Working with Rails? Tell the world

Working With Rails is an attempt to index all the developers around the world working with Rails. It offers a few ways to browse the index and while the authority and popularity lists are perhaps a tad silly, I love looking at the country list. 3 programmers in Peru, 1 in Kazakhstan, and 3 in Uzbekistan. How cool is that?

Trying to break free from .NET?

Luckymonk escaped their .NET entanglement and found Ruby on Rails, but they still have to live in a Windows world. Now they’re putting on a workshop teaching you how to do the same. It’s in Chicago and it’s almost sold out.

Usually we don’t mention workshops any more (there are so many), but I thought it would be nice to shine some light on one of the lesser published transitions. The one from .NET to Ruby on Rails. We got plenty of stories of how PHP and Java folks are jumping ship, so its great to hear how it’s happening from the Microsoft camp too.