5 useful Ruby gems for Ruby on Rails
To follow up on my list of [useful plugins for–by-on-rails-plugins.html), I'd like to share a few gems that make my Rails development work much easier.
- nifty-generators: The first thing I do in a project (after version control and the database) is run nifty-generators' useful duo of nifty_layouts, which yields a clean, ready-to-roll application.html.erb and corresponding CSS; and nifty_config, a simple way to control constants in the application. Then I use nifty_scaffold to create all my models/views/controllers. This gem was created by Ryan Bates of Railscasts fame; I can't rave about it enough.
- mdarby-restful_acl: My method of choice for adding access control layers (ACL) to my applications. I generally try to avoid roles-based mechanisms, in favor of a simpler "admins, users, and everyone else" approach. restful_acl, formerly a plugin and now a gem, handles this wonderfully. Version 2.0.2 is even easier to use. It works great with the restful-authentication plugin I mentioned the other day.
- will_paginate: The best way to paginate returned results in your #index views so they span over multiple pages; the defacto standard after pagination support was removed from Rails' core.
- chronic: A natural language parser for Ruby. I've only used this one a few times but it will eventually make its way into other applications as I work my way through keeping them updated and current.
- starling: The simplest way I've found to run background processes in your apps, such as converting media files. I admit that I have a love-hate relationship with Starling, particularly running in tandem with the Workling plugin in production on an Ubuntu server, but once everything is set up properly it's just magic.
Those are my current five–I use others here and there to help with the likes of Atom parsing, CSV generation, and so on, but the five above make their way into my apps more than any other.. Questions or comments? Let me know what you think. Page may contain affiliate links.