Picture of glenn

10 Must-Have Rails Plugins and Gems (2009 Edition)

When Paul Graham wrote that the “list of n things” is a degenerate case of the essay, our first thought was “Wow! That’s for us!” And we’re going one step farther: we’re recycling an old “list of n things” essay from last year.

Seriously, we’ve been thinking of revisiting 10 must-have Rails plugins for a while now. There is a place for lists like that, and the Rails plugin and add-on space has been moving quickly. We are always looking for better ways to do things, so we try out a lot of the plugins that come along. Our list of favorites—the ones that we use on almost every project—is almost completely different than last year’s model.

There’s one important change in focus: the plugins and gems that are solely related to testing are gone from this list. Of course, that doesn’t mean we’re down on testing. On the contrary, we built RunCodeRun because we think testing is so vital. We’re saving the testing tools for the RunCodeRun blog; we’ll be writing another degenerate essay there as a counterpart to this one.

There are numerous other plugins we use for special needs, such as PDF generation or attachment handling. But our favorites are the ones that we use on almost every project. So here they are, along with brief comments explaining why you want to check them out:

  • Inherited Resources: eliminates most of the boilerplate code from our controllers. (The new controller responder feature in Rails 3 is similar in intent.)
  • Formtastic: takes most of the pain out of writing the markup for HTML forms. (Together, Inherited Resources and Formtastic make a nice alternative to scaffolding frameworks like Streamlined and ActiveScaffold.)
  • CapGun: provides easy build notifications (see this previous post for more info).
  • Faker: helps us generate fake data. We use it for testing, but mostly for providing demo data for development and staging environments.
  • Clearance: feature-rich authentication and signup.
  • Safe ERB: helps ensure that our apps are not vulnerable to cross-site scripting attacks. (We look forward to similar functionality being baked into Rails 3.)
  • RedHill on Rails Core: we use this primarily to declare foreign key references in our database schemas. Telling the database about table relationships adds a small cost to our projects, but we’ve found that the benefits outweigh that cost. (It’s unclear where this plugin lives at the moment, but there are numerous forks of it on GitHub.)
  • RPM: Rails Performance Management from New Relic; wonderful for discovering and diagnosing performance problems.
  • will_paginate: the nicest, easiest pagination plugin we’ve seen.
  • hoptoad: great, customer-friendly notifications about exceptions that happen in the app.

Don’t reinvent the wheel! Use these plugins (or others like them), and definitely consider contributing to them if they fall short of what you need!

Comments
  1. Mel RiffeSeptember 30, 2009 @ 01:33 PM

    Hey Glen,

    Groovy post. I was wondering, though, if your team has looked at Resource Controller plugin (http://github.com/giraffesoft/resource_controller/)? It is in the same vein as Inherited Resources.

    That aside, I appreciate the list and will be checking out Faker, as well as a few others.

    Cheers, Mel

  2. Dan CroakSeptember 30, 2009 @ 03:09 PM

    Right on.

    I’m also using Inherited Resources, Formtastic, Faker, Clearance, RPM, & Hoptoad on every project, too.

    Didn’t know about Safe ERB. Will check it out. Thanks!

  3. stubbedSeptember 30, 2009 @ 08:55 PM

    I used to use Faker, but found that both Forgery and Randexp are superior to it.

    +1 for RPM, though. Very, very useful.

    Anyone NOT using will_paginate for the paging solution is probably doing it wrong.

  4. Thibaut BarrèreSeptember 30, 2009 @ 09:37 PM

    Nice list – I’d definitely add ThinkingSphinx to it though :)

  5. grimenOctober 01, 2009 @ 02:50 PM

    Let me edit:

    Clearance => Authlogic Faker => Forgery

  6. Simon HarrisOctober 02, 2009 @ 10:49 PM

    If anyone’s looking for the redhillonrails_core code, I’ve created an unsupported copy of it here: http://github.com/harukizaemon/redhillonrails

    You can read about my decision to stop supporting them here: http://www.harukizaemon.com/2009/09/plugins-grab-em-while-theyre-stale.html

  7. Jay MendozaOctober 13, 2009 @ 07:18 AM

    I just struggled with migrating my app to Resource Controller for a few hours, and found this blog while searching for other solutions.

    Based solely on how much more well-documented Inherited Resources is than RC, I expect to have a better experience with it.

    Thanks for the list.

  8. PolpravOctober 23, 2009 @ 04:23 AM

    Hello from Russia! Can I quote a post in your blog with the link to you?

Post a comment