What are the best Rails gems to learn for beginners | Inkoop Blog

Gems are the most important entity of Ruby on Rails. We talk about what are Rails gem that are most useful to learn for a beginner.

Posted by Vivek on 14 Oct 2018

Gems are one of the most important part of Ruby on Rails. It helps speed up the development of website using Ruby on Rails and makes developers follow Ruby on Rails development standards.

We will mention some of the gems that a beginners should learn to enhance their skills and write better code.

  1. Devise (Authentication)

Devise is very necessary gem that manages user authentication like login, signup and other features like password management, confirmation emails, locking account and also support for omniauth (Logging in via OAuth).

Some links:

Pundit deals with Authorization, it handles what content should be accessible by the logged in user. To setup, we define a policy (rules) class for every model and define what the current user can access or take action.

Some links:

Active admin builds a barebone admin panel with CRUD actions. It has a very basic design, implements filters, dashboard which can be customised and option to add comments in any of the model objects.

Some links:

Carrierwave provides support for file uploading in Rails, it has integrations with multiple gems like Fog (Uploading files to cloud providers) and Mini magic (ability to create multiple versions of image). With very minimalistic setup, you can add file uploading features to your app.

Some links:

Sidekiq or background processor is required when we can't process CPU/Memory intensive scripts in Rails server like generating large reports. Sidekiq is a gem that helps you setup a background processor where you can transfer work from Rails server to background to prevent heavy process from slowing down you Rails web server.

Some links:

Ransack helps you to write simple (yet powerful) queries to get most use of your data present in Rails models. It is quite useful if you don't have knowledge of SQL.

Some links:

  • Gem Github Link - ransack
  • Rspec (Test)

Writing test cases for your Ruby on Rails is quite useful and it makes your code more reliable and future proof. It is a behavior-driven development test framework which can help you test all aspects of MVC. It can be integrated with other gems like cucumber, capybara to make more use out of it.

Some links:

If you want us to write more details about any of these gems or want to learn some more gems, please comment below.


Have a Project in mind?