DEV Community

Cover image for The Heaven and Hell of Ruby on Rails
Karan Shah for SoluteLabs

Posted on • Updated on • Originally published at

The Heaven and Hell of Ruby on Rails

Being one of the most mature frameworks, Ruby on Rails is still relevant in 2019. From Freshworks to Cookpad, top brands on the planet rely on it to run their internet businesses. This post aims to explore why Ruby on Rails is the right choice for specific products in 2019 and under what circumstances you should definitely, maybe avoid it to prevent tech disasters & nightmares.

We are halfway through 2019, and I couldn’t have been more excited to pen my thoughts on using Ruby on Rails for product development. The beginning of the year saw a lot of people exploring whether Rails is dead while others were contradicting them with saying Rails is still in demand.

As an RoR Product Development company and have used the framework to build different products for different domains, I believe my humble experience with RoR is worthy enough for countless people (startup owners, MVP enthusiasts, growing product companies, etc.) who feel overwhelmed in the quagmire of various technology stacks.

And as a developer, I firmly believe it is our responsibility as a community to offer the right advice and roadmap to people who rely on us for our expertise.

I had been meaning to write this post for ages but alas those who develop products know how difficult it can be to find time to even relax. Finally, I decided to spare some time to put forward some of my thoughts regarding using RoR for product development in 2019.

Here we go.

I have seen clients come to me for both — building products from scratch and growing/scaling existing ones to new heights.

For both these scenarios, I have seen them being advised the wrong stack (God knows for what reasons when a particular technology should not have been used in the first place). It just messes the product, its growth and most importantly the user experience. I have seen people losing paying customers and it’s certainly not a good place to be at.

Ruby on Rails has matured a lot in recent years and will continue to stay relevant in the tech ecosystem. Despite people moving onto different frameworks like NodeJS, Django, JavaScript, etc RoR is still the preference for startups and MVPs because of the cost factor and time-to-market. Also, it wouldn’t be really fair to assume the high usage of NodeJS frameworks from the below graph as NodeJS is used with RoR as well.

On a separate note — I don’t rely on Google Trends so I checked out Google Ads (Keyword Planner) — Look what I found :)

The recent Github research, mentions that Ruby is still in the top 10 programming languages.

The Case for using Ruby on Rails for Product Development in 2019

Ruby on Rails is one of the top three choices for early-stage startups and tech companies. Especially the ones that need service-oriented architectures. These companies also use a broad array of other frameworks like Python, JavaScript, etc. But, you will find Ruby critical where speed-to-market is the key. Larger corporations that are not necessarily focused on tech, are more into Java and Microsoft platforms.

Getting your product out the door

Whether you are a newbie developer working on a side project or working full-time hustling on solving a problem through a web app, RoR can be a perfect choice for you to ship an MVP in less than two days.

These scenarios are unique because -

  • One works on a shoestring budget here.
  • The product/idea needs to be quickly validated.

Using some other framework like Laravel or Django here might take considerable time. For instance, Scaffolding is simpler in RoR. Things can get a little manual when you use Laravel or Django.

People have been using RoR to build an MVP during the weekend and get it validated. Something like Reddit or the front page of hacker news with features like threaded comments, user accounts, algorithmic popularity feed for posts (like HN front page or Reddit), collaborative maps etc.

I would strongly advise using Rails for products that need server-side rendered web applications with a relational database backend. Whenever we get inquiries for web app development that are CRUD based, no framework beats Ruby on Rails. If an app’s job is 90% CRUD, RoR is the way to go.

Getting things done

Take any framework on the planet and you won’t find one that does not have a philosophy attached to it. RoR was built to get things done in the simplest way possible. Period. It’s all straightforward code.

Here’s what developers are saying about RoR -

Ruby on Rails = Convention over Configuration

What does this mean?

As a programmer, one does not need to spend time on configuring files in order to set up, Rails comes with a set of conventions which helps to speed up the development process.

This makes it easier for developers to build a robust (barebones) application in record time.

Some might argue to use Sinatra or Padrino. But, I would without a doubt choose RoR for the sheer size of its community. As an RoR Product Development company owner, I still advise people to go for rails-API for a backend with some separate frontend built in React or Angular.

My developers have used Rust for web app development and I can vouch that nothing beats Rails in terms of what it provides. (RoR, definitely, has its problems which we will cover in a while).

Designed for happiness

RoR is designed to make frequent stuff easy and time efficient. Things that don’t need to be there will stay out of your sight & mind, based on the above formula. You might think other frameworks offer better options but in reality, you will have no more than a couple of credible options. With RoR, you will save a lot of time and tedious efforts of doing the research and implementing stuff your way.

With Rails, everything just works and is a breeze.

Starting a new project, folder structure, emails, caching, database interactions, testing, concatenating CSS/JS, templates, login systems, permission systems, file uploads, abuse prevention, you name it and RoR has it (or there are Gems for it).

All of which is fully documented.

A fellow developer rightly puts it -

It all feels like a big cohesive tool to utilize and not some uber-modular-plugins-collection-that-all-work-differently-because-each-one-was-made-by-some-random-guy. When you do need to reach for some plugin, you type in a command and it is installed/ready and it “fits right in” with the flow of everything else.

More productivity, less bullshit

If you have worked with Django, you will know what I am talking about (I am not ranting about the framework just a small comparison about how it’s like to work in RoR instead).

You don’t need to list down 50 steps to copy in lines of code into 10 different places. And, no more spending those countless hours into troubleshooting why a particular thing is not working as it should. Or for that matter, why an error pops out even when everything you implemented was right.

RubyGems are used by millions and backed by a growing community of genius people. Their philosophy is to bring a smile on developers’ faces. It’s what they work for.

RoR based web development in 2019. Explore the opportunities.

Use it for small to medium applications. The coding is faster and you will quickly reach your target market. It’s a cakewalk to write queries in ActiveRecord.

Some people might differ here and say one can also use Ecto. However, it is over-engineered. Queries, updates, transactions, everything is a productivity killer. For 99.9…% of the web apps, it will be fast enough and the CPU will sit idle most of the time.

If you are starting out in e-commerce, there are open source frameworks for RoR like Spree and Solidus.

You can even try building social networks with it. Social_Stream is an engine for developing performance-oriented sites.

Refinery CMS is an RoR powered content management system. It has more than 550,000 downloads to date. Companies across domains like transport, education, marketing, etc. use it to power their online presence. Learn more about working with this CMS here.

Have a Uber-for-X idea in mind? You could use RoR to develop your MVP and even scale it. Instacart is a prime example of this. Brandon Leonardo, along with his co-founder, built the initial front-end of the iOS version using Rails framework. The dictionary server, Redis, was used to serve up images and it ensured the code was clean.

Backbone.js was used to build a single-page website, which called the backend APIs. So, when the Android version and the consumer mobile web app were launched, there was consistency across platforms by calling the original APIs. There was no need to rewrite code for each.

RoR is more geared towards to be a BACKEND FOR WEBSITES the one that connects the database and HTML of webpages. In these scenarios, the speed is more dependent on a browser, the database engine and the connection vis-a-vis RoR.

Also, if I want to create APIs from scratch, Rails is the choice for me.

RoR can scale

For those of you who have had doubts about whether RoR can scale or not - It definitely can. The issue is if you are not aware of the technicalities and are not experienced enough, it can create debt and scaling issues.

Good ruby scales, bad ruby does not — both exist.

Rails have been used at highly successful companies that handle 40K requests per minute.

Shopify is another example.

When using Ruby on Rails for Web App Development becomes a strict No-No….

When we talk about concurrency and performances, you want to avoid full-blown, homegrown nightmares. For these situations, both Rails and Django are not advisable. If its a very big application and you will have to scale it, explore something like Phoenix.

Some people might refer to this post, but what I am trying to say here is performance still can be an issue. When you need to have both, I generally advise people to steer clear of RoR.

At Malware Bytes, they use Go to handle millions of request per minute. They shifted from RoR. Leveraging multi-threading, parallelization, fast executions, and small memory overhead were important here. Read the case here.

When you are looking at, asynchronous tasks and want it to run quickly, think about Phoenix + Elixir.

Speed is definitely not one of the strongest points of RoR. If you are expecting millions of users and a very high-traffic website, look for some other framework.

I have seen RoR overkill a product. My advice would be — look for existing solutions and build on top of it. Rails is not required for every web application. Another scenario, when you are looking to use advanced AI/ML techniques in your product, go for Python instead of RoR.

Also, for highly simple requirements like a setting up a blog, RoR is something you should never touch. When time isn’t a constraint for you, look for other options.

Don’t choose a framework blindly

Just because a new framework is trending or a tech behemoth has endorsed it, that does not mean its the perfect choice for your next digital product. Look into the ecosystem, talk to fellow entrepreneurs, have detailed discussions and discovery meetings with developers to see what’s the right fit. The answer will depend on your business, its goals, the market you are operating in, and most importantly what your users want.

If you are comfortable with a framework and love building things with it, go for it. I would end this post with a very nice YouTube video I came across on — Should I use Ruby on Rails -

I invite you to discuss what framework has worked for you, when has RoR worked for you, has it caused you nightmares…it will help others learn from our experience.

Thanks for reading!

Top comments (3)

hopsoft profile image

Rails will scale much further these days than most people think. Make sure your team honestly weighs the trade offs before reaching for something different.

For example, my company runs an ethical ad platform on Rails which helps support open source projects. We currently serve > 2.5 million requests per day with our most critical endpoints averaging < 70 millisecond response times... half of that time being database related I/O.

And... we hope to be able to scale significantly on the Rails stack. 🤞

Feel free to check out the project:

karan_shah89 profile image
Karan Shah

There's tons of demand, I can assure you that. And don't go on just the total number of jobs out there - you will have more airhostess than captains and maybe their openings are more too but does that mean you should pick the former?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.