7 Ruby Gems To Keep In Your Toolbox

Ruby Gems

With Ruby gems, you can use open source code to make your life a lot easier when developing Ruby applications.

Through my experience with this language I bring you seven of my favorite and useful ruby gems that I consider "must have":

1. RuboCop

When writing code, it's nice to make sure it's readable to any good programmer.  Of course, that programmer could be your future self. You may have heard this famous joke: 'When I wrote this code only me and God knew what it does, now only God knows'. This gem will check your static code and say if it's good or not based on Ruby community guidelines of code style. By Bozhidar Batsov.

2. Devise

This gem will provide an easy way to set up authentication with your rails application. With this you don’t have to worry about creating DB relationships or even adding a bunch of code to verify if a user is or isn't logged. You can either add its default DB settings or integrate with your schema. Back in time I remember how hard was to do it in any application and ensure all scenarios were being covered. By Platformatec.

3. Cancancan

After authentication, a common need is an authorization and that's what CanCanCab gem is all about. A few lines are all that's needed to restrict access according to your needs. No more spending hours in modeling/applying changes when a new role or a new user comes in. By CanCanCommunity
What if you need to run a few tasks in Ruby but want to do it in the background? Such as a few searches or backup or even suggest to a user while something is on going? This gem provides an easy way by using threats to handle these jobs at the same time in the same process. Thank you, Mike Perham, for making my apps a lot faster. By Mike Perham.

5. PaperTrail

When developing a rails project, you'll make yourself familiar with `rake db:migrate` which needs to be done when you modify your current models. With time, you may have run it more times than you wanted and need to fall back a version. That will turn into a nightmare. With this gem, you can track changes to provide auditing and/or versioning. Andy Stewart made it possible; thank you! By Andy Stewart.

6. Carrierwave

Uploading files can be a real spend time problem due to worries with file extensions, injections while listing files, and storage location. if you need to resize an image you may have math formulas to keep aspect ratio, save thumbs, etc. Jonas Nicklas created Carrierwave which saves weeks of programming. With a few lines, all of this is possible. By CarrierWave.

7. Delayed Job

Also known as DJ, it provides long/short running asynchronous tasks in background. This is very useful when doing queries without hanging up the app during a process. This helped me provide a better user experience for my apps. By Collective Idea.

Let me know which gems you would have put on the list in the comments.


(Toolbox image by Florian Richter)
Try It for FREE

Diego Rondon

Support Engineer at Engine Yard.
Find me on:


Subscribe Here!