<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Okoli Chijioke on Medium]]></title>
        <description><![CDATA[Stories by Okoli Chijioke on Medium]]></description>
        <link>https://medium.com/@okolichijioke_20375?source=rss-223704a964b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YBOuadtzpHa7h5DheHlBVw.jpeg</url>
            <title>Stories by Okoli Chijioke on Medium</title>
            <link>https://medium.com/@okolichijioke_20375?source=rss-223704a964b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 09:58:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@okolichijioke_20375/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[12 Most Common Gems Used by Every Rails Developer]]></title>
            <link>https://medium.com/@okolichijioke_20375/12-common-gems-used-by-every-rails-developer-5f0082166d4e?source=rss-223704a964b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f0082166d4e</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[rubygems]]></category>
            <category><![CDATA[rails-6]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[rails]]></category>
            <dc:creator><![CDATA[Okoli Chijioke]]></dc:creator>
            <pubDate>Fri, 30 Jul 2021 13:51:03 GMT</pubDate>
            <atom:updated>2021-12-16T10:35:28.408Z</atom:updated>
            <content:encoded><![CDATA[<p>What is a RubyGems?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wiEYCU9affTMEKVK4JIxug.jpeg" /><figcaption>Rails gems</figcaption></figure><p>I always tell newbie rubyist that RubyGems is just ruby’s way of saying “NPM”. Just as NPM(node package manager) is to JavaScript(node environment), is the same way RubyGems work for Ruby, hence, in the same way, you would say npm is a package manager for the JavaScript node environment you could say the same for RubyGems as a package manager for the Ruby Programming language, and package managers are tools used to install external programs and libraries, and in RubyGems case, a tool used to install gems.</p><p>In this article, I would list some <strong>common</strong> default gems that Rails install without our notice and some other important gems for both Backend and Fullstack Rails developers.</p><h4>Rails Default Gems</h4><p>Ruby on Rails has a lot of default gems that it installs for you but here I wouldn’t mention all but some of the common ones that we can see in every rails application whether Rails full-stack or Rails API applications, so I wouldn’t be mentioning likes of Any database engine Gems (SQLite gem, PG gem, MySQL gem, and so on..) or any web server gems(Puma, Nginx, Apache, and so on..).</p><ol><li><strong>Rake Gem</strong>: <a href="https://github.com/ruby/rake">Rake</a> is a task runner and it’s Ruby’s official <a href="https://en.wikipedia.org/wiki/Build_automation">build automation</a> tool. Rake is also RubyGems tenth most downloaded gem(as of mid-2021) just behind the rack gem, Rake is Ruby Make, a standalone Ruby utility that replaces the Unix utility ‘make’, and uses a ‘Rakefile’ and files with the .rake extension to build up a list of tasks. In Rails, Rake is used for common administration tasks, especially sophisticated ones that build off of each other. You can get a list of Rake tasks available to you, which will often depend on your current directory, by typing rake --tasks. Each task has a description and should help you find the thing you need(rake about # List versions of all Rails frameworks and the). Though as of Rails ≥ 5 versions, it isn’t important to use Rake commands like db:create, db:migrate, rake routes unlike the way it was for Rail &lt; 5 versions where rake commands were needed most at times and to create or migrate a database rake db:createand rake db:migrate were used as the only command for those purposes. As an intermediate or senior rails developer, it is always good knowing the use of the rake gem in rails, as it is a very frequent question asked by interviewers.</li><li><strong>Rack Gem: </strong>Rack is an underlying technology behind nearly all of the web frameworks in the Ruby world. It acts as a middleware between the framework and webserver be it Puma or Apache and so on, Rack is just an interface that helps the different ruby web frameworks communicate with different web servers, this stops the need for different configurations for different servers with different frameworks, as the framework wouldn’t need to directly communicate with the webserver thanks to the Rack middleware.</li><li><strong>Bundler Gem: </strong>Just as it is known as “The best way to manage your ruby application gems” and I would say the number 1 gem on every rubyist list and the most downloaded gem on RubyGems does just that. Bundler provides a consistent environment for ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell and ensures that the gems you need are present in development, staging, and production. Starting work on a project is as simple as bundle install , all of this in my book, makes bundler the most important gem needed by every ruby developer on All ruby frameworks whether Rails or Sinatra.</li><li><strong>Webpacker Gem:</strong> Webpacker makes it easy to use the JavaScript pre-processor and bundler <a href="https://webpack.js.org/">Webpack v5</a> to manage application-like JavaScript in Rails. It coexists with the asset pipeline, as the primary purpose for web pack is app-like JavaScript, not images, CSS, or even JavaScript Sprinkles (that all continues to live in app/assets), In other words, Webpacker is a Rails wrapper around the <a href="https://webpack.js.org/">webpack</a> build system that provides a standard webpack configuration and reasonable defaults. The goal of webpack, or any front-end build system, is to allow you to write your front-end code conveniently for developers and then package that code in a way that is convenient for browsers. With webpack, you can manage JavaScript, CSS, and static assets like images or fonts. Webpack will allow you to write your code, reference other code in your application, transform your code, and combine your code into easily downloadable packs.</li></ol><p><strong>Common Backend and Fullstack Gems</strong></p><p>Here are some gems that are mostly installed manually or added to your gemfile, also gems that are common between Fullstack Rails and Rails API applications.</p><ol><li><strong>Devise Gem</strong>: Devise is rails most famous and common authentication tool, it is a flexible authentication solution for Rails based on Warden. Authentication is just the process of verifying someone’s identity by using pre-required details, and it is one of the most important features of any app, In its simplest form, you want your user to be able to sign up, log in, and log out securely. You could rely on Rails’ built-in method has_secure_password<em> </em>to provide that functionality, but then you’re required to add necessary password validations and helper methods yourself and what if your user forgets their password, these are all just all complex and new functions that need to be added to your application for authentication, which is were devise comes in solving each of these problems with its built-in functions and callbacks, Devise is a very complete gem that does all the authentication work for you, or most of it if you are thinking about a very specific feature you would want to implement. Devise is what most companies use for authentication on their rails app as it is better than building a custom authentication tool of their own, in terms of time-saving it is better.</li><li><strong>CanCanCan Gem</strong>: This is one of rails most famous Authorization solutions, CanCanCan is an authorization library for Ruby and Ruby on Rails which restricts what resources a given user is allowed to access. All permissions can be defined in one or multiple ability files and not duplicated across controllers, views, and database queries, keeping your permissions logic in one place for easy maintenance and testing.</li><li><strong>SideKiq Gem: </strong>There are many choices for background processing tools when using Ruby on Rails, however, <a href="https://rubygems.org/gems/sidekiq">Sidekiq</a> is one of the most popular ones. The reason behind its popularity is the simplicity of its API and how it scales much better than other background processors. Sidekiq uses threads to handle many jobs at the same time in the same process. It does not require Rails but will integrate tightly with Rails to make background processing dead simple.</li></ol><h4>Common Fullstack Rails Application Gems</h4><p>Below Are some common Rails Gems you find in some Rails Applications with views:</p><ol><li><strong>Kaminari Gem: </strong><a href="https://rubygems.org/gems/kaminari">Kaminari</a> is not a very descriptive name for a Gem, however, it is one of the most popular Gems with almost 5 million downloads. It enables you to paginate anything from ActiveRecord relations to simple arrays using a clean, easy to use and simple scope-based API that is fully agnostic to whatever ORM or template engine you use.</li><li><strong>Paperclip Gem: </strong>File attachments are never easy to work with. They typically involve a significant amount of work to implement and even more time to make sure that they are implemented in a very secure manner. <a href="https://rubygems.org/gems/paperclip">Paperclip</a> takes care of this entire process for you inside your Rails application and extends it even more to things like transforming images to thumbnails and much more.</li><li><strong>Slim/Liquid Templating Gems: </strong>Ruby on Rails uses the eRuby template system by default, however, it’s typically something that users will choose to replace. <a href="https://rubygems.org/gems/slim">Slim</a> and Liquid are some common replacement because it allows you to maintain very easy-to-read templates due to their simple syntax while maintaining very fast compilation times.</li></ol><h4>Common Backend Rails Gem</h4><p>Here are some common used by most backend rails developers:</p><ol><li><strong>Rack-cors Gem: </strong>Cross-origin resource sharing (CORS) is a great security mechanism that every web application developer should know about. Whenever you’ll be exposing some Application Programming Interface(API) to the internet, make sure to implement CORS and Rack-cors gem helps with its implementation in rails. Rack::Cors provides support for Cross-Origin Resource Sharing (CORS) for Rack compatible web applications and as mentioned that rails use Rack as its middleware hence making it compatible with rails.</li><li><strong>Jbuilder Gem</strong>: though this is a Default gem and can be used in both full-stack application and backend, I included this here because it is mostly used by backend developers, Jbuilder gives you a simple DSL for declaring JSON structures that beats manipulating giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops. Other alternatives are JSON serializers gems like Fast-jsonapi or blueprint which essentially do the same thing.</li></ol><p>That&#39;s all for now, Some notable addition to the list would be the RSpec-rails gem(which brings the <a href="https://rspec.info/">RSpec</a> testing framework to <a href="https://rubyonrails.org/">Ruby on Rails</a> as a drop-in alternative to its default testing framework, Minitest.), though a majority of these gems may have some notable alternatives (like nowadays the Pundit gem is more preferred to the cancancan gem), these gems are the most used and popular in their respective fields.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f0082166d4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>