Skip to content
Menu
Railshero
  • Blog
  • About Me
  • Contact Me
  • Privacy Policy
Railshero
Some Popular Gems For Your Rails Apps

Some Popular Gems For Your Rails Apps

Posted on September 14, 2021September 15, 2021 by Rails Hero

Popular Ruby Gems

These are the most popular gems that i have used at some point, when building web applications with ruby on rails. These features and functionalities can also be added from scratch without using any ruby gems, but using ruby gems is a much better, faster and practical way to implement those features and functionalities in web applications.

Authentication

Authentication is a necessary feature in most modern web applications. For authentication, there are a few popular gems that gets the job done, all of them use somewhat common methods and techniques to achieve this. Devise is the most popular one and is widely used, but there are other gems as well, check them out if you haven’t. Here’s how to use devise.

  • Devise: https://github.com/heartcombo/devise
  • Doorkeeper: https://github.com/doorkeeper-gem/doorkeeper
  • Omniauth: https://github.com/omniauth/omniauth
  • Authlogic: https://github.com/binarylogic/authlogic

Authorization

For authorization, pundit and cancancan are the most popular ones, because they are quick and easy to use. Here’s my tutorial on how to use pundit for authorization.

  • Pundit: https://github.com/varvet/pundit
  • Cancancan: https://github.com/CanCanCommunity/cancancan
  • Rolify: https://github.com/RolifyCommunity/rolify
  • Authority: https://github.com/nathanl/authority

Pagination

Pagination is must, kaminari and will pagniate are quick and and easy to implement, but much slower than pagy, pagy is a lot faster than any pagination gem, but it requires additional steps to setup and is more complicated to implement. Here’s my tutorial on how to use kaminari for pagination.

  • Will paginate: https://github.com/mislav/will_paginate
  • Kaminari: https://github.com/kaminari/kaminari
  • Pagy: https://github.com/ddnexus/pagy

Tagging

Tagging is a must have feature for any blogging type of a web apps, this can be done with a couple of gems like “acts as votable” or with “guten tag”.

  • Acts as taggable on: https://github.com/mbleigh/acts-as-taggable-on
  • Gutentag: https://github.com/pat/gutentag

Voting

For voting or adding like/dislike feature i have used only this gem so far. Here’s a tutorial on how to use acts as votable to add likes/dislike feature to your app.

  • Acts as votable: https://github.com/ryanto/acts_as_votable

Activity Logger

For activity logging i have found only “public activity” gem, that works the way i expected activity logs to function. See this tutorial on how to use activity logger.

  • public activity: https://github.com/chaps-io/public_activity

File uploads

For file uploads, we have a variety of gems, with it’s own unique features, some are easy to use while others require advanced methods. Also some support direct uploads, and some don’t. And if you wan to use Active storage, it already comes with rails6 by default, you just have to run a few migrations and enable it.

  • paperclip: https://github.com/thoughtbot/paperclip
  • shrine: https://github.com/shrinerb/shrine
  • carrierwave: https://github.com/carrierwaveuploader/carrierwave
  • refile: https://github.com/refile/refile
  • active storage: https://www.rubydoc.info/gems/activestorage/0.1

Search

To add search functionality to your rails apps, ransack is the easiest to implement. Search gems also comes with modern search features like autocomplete, indexing, caching, etc. Here’s a tutorial on how to use ransack to add search.

  • searchkick: https://github.com/ankane/searchkick
  • ransack: https://github.com/activerecord-hackery/ransack
  • elasticsearch-rails: https://github.com/elastic/elasticsearch-rails

Background Processing

For Background Processing, i have used sidekiq and delayed job, each of them have it’s own features and disadvantages as well.

  • Sidekiq: https://github.com/mperham/sidekiq
  • Resque: https://github.com/resque/resque
  • Delayed Job: https://github.com/collectiveidea/delayed_job

Deployments

For deployments or automatic deployments, capistrano is a great gem that makes everything easier to deploy on any type of server or even multiple servers, cloud instances or containers with just a few steps.

  • capistrano: https://github.com/capistrano/capistrano

Administration

If you want to quickly add an admin panel to your rails app, without manually constructing it from scratch. You can use gems like active admin and rails admin.

  • ActiveAdmin: https://github.com/activeadmin/activeadmin
  • rails_admin: https://github.com/sferik/rails_admin

Databases

There are a lot of database types and gems, but here’s the most popular ones. Sqlite3 already comes with rails, but it’s not practical to use it in production so i recommend either pg or mysql for production use.

  • pg: https://github.com/ged/ruby-pg
  • sqlite3: https://github.com/sparklemotion/sqlite3-ruby
  • mysql: https://github.com/brianmario/mysql2

 

Final Thoughts

So, these were some of the popular gems that i have use when building web applications with ruby on rails. In future i will be adding more gems to this list. So, that’s all folks, have a nice day.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tags

active record active storage assets assign to many associations attachment attachments authentication authorization avatar bootstrap cdn config database deploy deployments devise DRY environment variables file uploads Gemfile gems has_many helpers heroku index indexing initializer javascript pagination parameters postgres production public routes.rb ruby gem ruby gems search sendgrid server smtp stylesheets variants views voting

Recent Posts

  • Understanding the DRY Principle in Rails
  • Building Multi-tenant Applications with Rails
  • Rails Basics: Templating Engines
  • Deploying With Capistrano
  • Automated Testing in Rails

Archives

  • July 2023
  • June 2023
  • October 2021
  • September 2021
  • August 2021
  • July 2021

Categories

  • Active Record
  • Activity Logging
  • Apps
  • Assets
  • Attachments
  • Audio
  • Authentication
  • Authorization
  • Deployments
  • Error Pages
  • File Uploads
  • General
  • Heroku
  • Heroku
  • Pagination
  • Rails Basics
  • RubyGems
  • Search Engine Optimization
  • Search/Indexing
  • Testing
  • User Interface
  • Video
  • Views & Templating
  • Voting
  • Web Security
©2025 Railshero | Theme: Wordly by SuperbThemes
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT