Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

8 Useful Ruby on Rails Gems We Couldn't Live Without

DZone's Guide to

8 Useful Ruby on Rails Gems We Couldn't Live Without

Five Ruby on Rails developers share their favorite Ruby applications that cover everything from JavaScript to chart making tools to SEO.

· Web Dev Zone
Free Resource

Make the transition to Node.js if you are a Java, PHP, Rails or .NET developer with these resources to help jumpstart your Node.js knowledge plus pick up some development tips.  Brought to you in partnership with IBM.

The open source community is what makes Ruby on Rails such a powerful platform. By implementing helpful open sourced Gems, Rails developers can adapt and build the exact features needed for a project – without wasting time building everything from scratch. And while Gems are created on a daily basis, not every single one is a home run.

Sifting through dozens of Gems to find the perfect fit can feel like a Goldilocks mission. Luckily, we’ve tried and tested our share of Gems while building Rails applications across a wide range of industries. Here are eight Gems our development team has used in 2017. They’ve all been put through the ringer, tested, and come with an official Argonista stamp of approval. Check them out:

John Cech, Backend Developer

Pundit – User Authorization

Someone new to web development (or outside stakeholders on a project) might confuse authorization and authentication. Authorization decides what abilities a user has on a certain application or website. If you’ve ever received an error message that you didn’t have proper admin rights to perform a task on an application, you’ve seen user authorization in action.

Pundit solves common authorization issues in the most “Rails” way possible. It’s easy to configure and customize across a wide range of applications. It’s a super useful Gem to keep in your back pocket.

WebPacker – JavaScript Management

JavaScript is constantly changing. For years, Rails has lacked a simple bundling system for JS assets. WebPacker resolves this by allowing you to decide how to manage assets. It’s a handy tool to familiarize yourself with, as this methodology is likely the future of how we serve up assets that were previously provided by Rails sprockets. This gem will also be baked right into Rails 5.1.

Webpacker bundling for JavaScript assets

If you’re still on the fence about updating your Rails app, this is just one of several additions that will increase efficiency. Plus, here’s three more reasons you shouldn’t wait to update.

Robby Russell, Partner

Smarter CSV – CSV Import

The process of importing massive CSV files into an application’s database can be a doozy. Unlike most CSV parsers, Smarter CSV can process the stream in smaller sections. This was a big help on a project where the existing import process was timing out on spreadsheets with large amounts of records.

Bundler – Audit

Updates and fixes can leave your program with small security vulnerabilities that are hard to catch. Bundler performs a thorough audit of your application’s Gem version and produces a report of any security issues that need to be patched. Each issue is given a level of criticality and upgrade solutions.

Scott Dudley, Backend Developer

Rails ERD – ActiveRecord Diagrams

In the discovery phase of an existing application, learning how different models in a project relate to each other can be a tedious and confusing process. Rails ERD generates diagrams of your ActiveRecord Models to help you visualize connections and dependencies.

Gem for ActiveRecord Model diagrams: Rails ERD

It’s a major headache saver for any developer who learns visually.

Chartkick – Chart Creator

This gem creates stunning JavaScript charts with one line of Ruby, saving you time spent working with charting libraries. While it’s not the most extensive data visualization tool, it’s speedy. You can go from nothing to engaging charts and graphs in just a few minutes.

Gem for creating charts in Ruby: Chartkick

Kathryn Carr, Backend Developer

Annotate – Annotate Rails Classes

New developers or anyone working on a large application with a complex data structure will find Annotate to be a lifesaver. This Gem annotates Rails classes with schema and routes info. On projects where the schema is kept in SQL format, Annotate will save you from looking at migration files or spinning up an instance in the console when you need to know about the attributes of a model.

It’s a big time saver on large scale projects.

Brian Middleton, Frontend Developer

MetaTags – SEO-Friendly Rails Apps

SEO can sometimes feel like deciphering hieroglyphics. Experts guess on new aspects of Google’s algorithm nearly every week, but there are a few staples of SEO that have remained integral for years. MetaTags simplifies SEO by allowing you to easily set all of the tags and descriptions you need for your web page.

This SEO Gem handles canonical URLs, Open Graph tags, Twitter tags, titles, descriptions, and more. You can even set defaults for particular pages.

Over to You

We're constantly on the lookout for new Gems to try. What Gems have you discovered recently that have been a big help? Leave a comment below or shoot us a Tweet and let us know!

Learn why developers are gravitating towards Node and its ability to retain and leverage the skills of JavaScript developers and the ability to deliver projects faster than other languages can.  Brought to you in partnership with IBM.

Topics:
web dev ,ruby on rails ,applications

Published at DZone with permission of Erica Tafavoti, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}