<img height="1" src="https://www.facebook.com/tr?id=&quot;1413357358800774&quot;&amp;ev=PageView&amp;noscript=1" style="display:none" width="1">

Hello, my name is Kazimierz Szołtysik, and I have been a Ruby developer at Railwaymen since July 2020. Since 2015 I have been consistently writing and developing applications in Ruby and Ruby on Rails. Why Ruby? Because in my opinion, it is the most readable and elegant of all backend languages ​​I have come across so far. Programming in it is a lot of fun, and you can create a very clear and extremely readable code in it. Why Ruby on Rails? Because thanks to creating this framework in 2015, it became possible to develop fully independent web applications using the Ruby language.

Yes, it is possible to code very advanced applications with Ruby on Rails. Take a look at one of our projects that I am part of. James Marketing Amplifier is a marketing automation web app dedicated to small law firms. We built this web application from scratch. The scope of the project includes Frontend, Backend, Quality Assurance, and UX/UI design. We already implemented some exciting features such as Branded Documents, Files Library, Client Lifecycle, User & Admin Panel, Statistics. The project is still ongoing, and we are working on new functionalities.

Ruby on Rails web app - James Marketing Amplifier

Table of Contents:

1. Is tool-less work a good idea while web development?

2.14 best Ruby on Rails development tools.

2.1. Ruby Gems.

2.2. Rails Gems.

2.3. Command line tools/plugins.

3. The future of Ruby on Rails.

4. Conclusion.

 

Is tool-less work a good idea while web development?

Once a developer becomes very proficient in Ruby, he may think that tool-less work is a good idea and start doing everything by himself, manually. He may be tempted by the vision of creating 100% proprietary solutions over which he will have full control and be able to say with satisfaction that he created everything on his own. However, this is not a very wise approach when we are creating a commercial project with a limited budget. In this situation, it is not worth breaking through the open door.

Ruby has long ceased to be new and is one of the most popular backend languages ​​today. By using it, we get great support from the community of developers who create libraries (the so-called Ruby gems). You can and even have to use these tools because they significantly improve our work, offering solutions proven and tested by their creators in different ways, thanks to which we as developers gain valuable time.

 

When selecting tools, it is worth considering factors such as: 

  • number of downloads, 
  • date of last modification, 
  • number of "stars". 

Personally, I am always interested in the quality of the code in a given repository in case there is a need for debugging in the future.

14 best Ruby on Rails development tools

I have selected some of the most important Ruby gems for you, thanks to which I save much time in my daily work. I have also picked a few Ruby on Rails gems (or Rails gems) for you, which extend the vanilla framework with new functionalities. Finally, there will also be some system tools that I think can be very useful to you while Ruby on Rails web application development.

Ruby gems:

Tmuxinator

Tmuxinator is a gem for the simple management of Tmux sessions. The layout of each session is created in the form of a yaml file, so we can have an independent window layout for each project we are working on.

Hutch

Hutch is a useful solution when we connect microservices with each other, and we need to do it asynchronously using RabbitMQ. Thanks to it, we will not be afraid of interruptions in communication because all messages are stored in queues that are able to survive system failures.

ActiveHash

When the logic of our web application is based on static data, we can store it in the form of entries in yaml files stored in the repository. Gem ActiveHash provides us with mapping this data through a model very similar to ActiveRecord. Associations with ActiveRecord are also possible.

Pry-remote

Pry is the most advanced Ruby debugger that probably every developer who creates software in this language knows. However, not everyone is familiar with pry-remote, which enables remote debugging using the DRb protocol. Now It is possible to stop the program execution by the Rails server process running in the background, e.g., on the development machine.

Omniauth

When our application requires authentication with multiple providers, the easiest solution is to use Omniauth. Thanks to this, we can easily log in to our application using websites such as: Facebook, Instagram or LinkedIn. Gem Omniauth provides a solution in the form of a black box that runs as Rack middleware and, after redirection from an external website, gives us access to user data in the form of a hash.

Ruby on Rails development tools


Rails gems:

CanCanCan

Clear to use and powerful authorization system. It is very helpful when we need to have a permission system in our application, especially when we introduce a complicated division into user roles.

Webpacker

Webpacker is a gem that allows using the webpack tool with the Ruby on Rails framework. It enables a stress-free connection between Rails and React, regardless of the asset pipeline system built into Rails.

Papertrail

Papertrail is used to track any changes to the ActiveRecord model. The database stores not only attribute changes, but also information about their time of occurrence and the author. Thanks to this, it is possible to easily restore the model version from a specific point in time without having to reach for a database backup.

Scenic

Scenic makes working with PostgreSQL more pleasant by extending ActiveRecord with the possibility of creating database views in the form of migration. It gives us the ability to refer to these views as standard associations.

ActiveJob :: Uniqueness

When using ActiveJob with Redis, it may happen that we run the task several times with the same parameters. Gem activejob-uniqueness helps us to protect ourselves from this eventuality and decide how our system should behave. There are many possibilities, from simple locks for the duration of a task to temporary locks of a predetermined amount of time.

Tools for Ruby on Rails development

Command line tools/plugins:

Janus: Vim Distribution

Vim has enjoyed unflagging interest for years as a super-fast console editor, which can be a full-fledged IDE thanks to the use of plugins. In a situation where we want to painlessly enter this environment and avoid long configuration, we can choose a ready-made Janus distribution, in which we can find already installed a number of the most popular plugins that work perfectly with Ruby on Rails.

Fzf

Fzf is a console fuzzy finder that is always handy when dealing with lists. These can be lists of files, running processes, branches in GIT, or whatever. It has built-in autocomplete and is superfast.

Fzf.vim

Fzf.vim, extends the capabilities of the basic fzf wrapper for the vim editor. Provides integration with other popular plugins, such as Fugitive and UltiSnips.

rbenv

This is the Ruby version manager that requires the least disk space and configuration, which has made it my favorite one. A very important tool in application development, also irreplaceable in the production environment. It provides easy switching between Ruby versions that we compile and specify in the repository ourselves.

 

The future of Ruby on Rails

Ruby on Rails has been systematically developing for many years. It is our leading technology at Railwaymen. We see it as well-tested, stable, and safe framework. With Ruby on Rails, we can create web applications for various industries. Big companies such as Basecamp, Github, Twitch, Airbnb, Shopify chose RoR to develop their web applications. In version 6.0, new functionalities have been added: 

  • Action Mailbox, 
  • Action Text, 
  • Parallel Testing, 
  • Action Cable Testing. 

Many interesting changes were also made to the already existing modules. The most changes took place within ActiveRecord. As if that was not enough, the latest version 6.1 brings further improvements in areas related to database support, such as horizontal sharding or database namespaced tasks. I am glad that so much attention has been paid to database topics. It gives hope for an even better ORM in the future, where we will have to use raw SQL less and less in our projects.

Ruby on Rails in 2020Conclusion:

As you may see, there are many great development tools available nowadays. Ruby on Rails developers usually works in teams. Each team member should easily understand the code. Thanks to well-chosen tools, every developer can be effective and focus on delivering a well-functioning solution and high-quality code that will be pleasant to come back to, easy to understand and develop.

Which Ruby on Rails development tools are the best? Well, I am sure that every developer already has its own set. For me, the most necessary tools, without which I cannot imagine my daily work, are: the Vim editor with a set of plugins and a set of proven Ruby gems that I choose depending on the situation. If you are a novice developer, in my opinion, you should put special emphasis on standard and well-tested solutions. However, try to study their code gradually and make your own conclusions about how they work.

Using a set of development tools daily is a smart move for every person who wants to become a better developer. We have 5 more tips for you that will help you improve your skills:

 

How to Become a Better Developer: 5 Healthy Habits to Learn Right Away