Ruby on Rails Cheat Sheet

If you are a Rails programmer you know how important Gems are and how easy they can make it to bootstrap your website without caring about the basic modules and functions that most websites need anyways.

This article will give you a list of Gems that I use when developing a rails application. There are often different gems that do the same thing so this list does not claim to be complete or the best option. You are welcome to send me some of your favorite Gems and I will be happy to extend the list.

Admin

Rails admin is my tool of choice for backend data administration:

https://github.com/sferik/rails_admin

Mailing

Mailcatcher is a handy tool for checking your email functionality and layouts locally:

https://mailcatcher.me/

Scheduling

Whenever is my tool of choice for creating cron jobs and recurring tasks in rails:

https://github.com/javan/whenever

Bitmasks

Bitmasks come in handy if you are trying to implement things like roles or overlapping attributes:

https://github.com/joelmoss/bitmask_attributes

Statemachine

Statemachines come in handy if you want to depict states and events for your application flow:

https://github.com/pluginaweek/state_machine

Charts

Chartkick is my tool of choice for displaying charts:

https://github.com/ankane/chartkick

Access Management

Cancancan is a authorization library for rails. I use it to restrict access to certain resources:

https://github.com/CanCanCommunity/cancancan

Translation

I use i18n-debug to find out about the translation keys generated and used in my app:

https://github.com/fphilipe/i18n-debug

Debugging

Set Debug points and iterate through your code with pry-byedebug:

https://github.com/deivid-rodriguez/pry-byebug

Testing

RSpec is my Gem of choice for behaviour driven tests in Rails:

https://github.com/rspec/rspec

File Upload

I use carrierwave for file uploads in rails:

https://github.com/carrierwaveuploader/carrierwave

Forms

Forms made easy with simple form:

https://github.com/plataformatec/simple_form

Tags

A simple way to add tags to your models:

https://github.com/mbleigh/acts-as-taggable-on

Deployment

Capistrano is a deployment automation tool for Rails:

https://github.com/capistrano/rails

Authentication

Devise is a flexible authentication solution for rails:

https://github.com/plataformatec/devise

If you have any other suggestions to extend the list feel free to send me a tweet to @behsaad or an email to beh.ramez@gmail.com


comments powered by Disqus