THE 15 BEST GEMS FOR RUBY ON RAILS WEB APPLICATIONS
Ruby is a breakthrough in allowing web development as one can make use of
Gems to fill in functionalities. This allows one to build a web app in matter of days which would usually take months to develop. Gems are highly modular and perform a specific function, which makes integrating them into new applications extremely easy. Out of the multitudes of gems created by the Ruby community at large for use, we pick fifteen which, in our opinion, are the recommend ones that should be present in every web application.
Figaro is a simple, Heroku-friendly, Rails app configuration that uses ENV and a single YAML file that is used to securely configure applications written using Rails with great ease. Figaro introduces a convention that keeps the configuration data separate from the actual SCM(like GIT) by parsing the YAML file that is ignored by the SCM and loading its values into ENV.
Sidekiq is a full-featured framework for Ruby that offers simple and efficient background processing and is designed to be easy to integrate with any modern Rails application. Sidekiq uses multithreading to handle several jobs in the same process simultaneously. It is fully compatible with Resque.
Pry is a powerful runtime developer console for Ruby and is completely developed from the ground up to offer various features that are not offered by the standard IRB shell.
Devise is a flexible authentication solution for Rails based on Warden. It comprises 10 modules that might be used as needed without fostering any dependencies in the code and also permits you to have more than one model signed in at the same time. Devise executes in a completely thread-safe manner on YARV. Devise supports authentication through both Forms and HTTP Basic Authentication, supports OmniAuth and has various useful features like sending emails with authentication confirmation instructions or password reset instructions, etc.
- Carrier Wave / Paperclip
Carrier Wave is a classy approach to enabling file uploads for Rails, Sinatra and other Ruby web frameworks. Paperclip enables easy file attachment for ActiveRecord. Both these gems provide access to the file system within the web application environment.
If you are looking for reputed then check out Codebrahma.
- CanCanCan (inspired by CanCan)
CanCanCan is an authorisation library for Ruby on Rails that allows for walled gardens, that is, restricting access to resources and data for specific users. It is derived from the presently dead CanCan project.
Rspec is a testing framework for behaviour driven development in Ruby 3 and Ruby 4. Rspec allows you to simulate use of your application by testing all variants of user inputs to see if any combinations throw up any errors.
Doorkeeper is a provider for introducing OAuth2 (Ruby wrapper for OAuth 2.0 protocol) functionality to web applications using Rails or Grape. It enables more secure user logins and offers greater resistance to unauthorised access.
OmniAuth is a library that standardizes multi-provider authentication for web applications utilizing Rack middleware. OmniAuth uses strategies that can be used to specify conditions for authenticating users via disparate systems.
Capistrano is a framework for enabling remote server automation and deployment. Although written in Ruby, Capistrano is platform agnostic and can be used to deploy projects written in any language, including Java and PHP.
Sass-rails adds CSS assets to integrate the Sass stylesheet language(An extension of CSS) with web applications built using Ruby on Rails. Rails versions post 3.1 includes support for Sass right out of the box.
Most widely used library for designing JSON APIs through Rails. It has two chief components: serializers that describe which attributes or relationships to serialize and adapters that describe how the concerned attribute or relationship should be serialized.