Back to posts

Why Ruby? Why Rails?

A short post on why I decided to learn ruby and ruby on rails instead of some more popular frameworks

By Andy Maldonado
Posted: Sat Mar 25 10:34:53 2023


Whenever I talk to a software engineer about what I'm learning, they're always surprised to hear that I picked Ruby on Rails. Ruby on Rails had its moment years ago and since then there have been more popular backend frameworks that have integrated better with the copious amount of frontend frameworks. Ruby on Rails has a bit of a reputation as well in that it has poor performance.

So why did I pick it?

For starters, performance isn't an issue to me. I'm not making apps that are consumer-grade and even Fly.io's free plan covers enough performance for a basic app. Scaling up from 256mb to 512mb of ram is enough for this blog to run without any hitches and it costs fractions of a cent per day. In terms of actually running my apps, it hasn't been an issue so far. Even my more ram-hungry project, The Andy Hon (a pun on book from my Japanese studies) only needs 512mb on average. I shot it up to a gig because I figured it wouldn't hurt to have extra ram in case other people use it a bit. But overall, the performance hasn't been an issue. Again, I think if I were scaling for a company I'd care more but I don't think performance is an issue when loading simple posts or blog posts. The main downside isn't enough of a downside for me to care, which is a reason I chose it.

The other major downside is that it's old, but I see that as a bit of an upside. It means there's been a lot of improvement and change on it and there's plenty of information and material on how to use it. There are plenty of ruby gems available for use that have existed for years and provide a ton of functionality to your rails apps. I think as a whole it's a good idea to examine tools and their usefulness before adopting them anyway. In my case, I'd have to learn a new language (python) if I went for something more popular like Django anyway, so why not go with something different? There will likely be newer and hotter frameworks in the next few years and I can pick them up as necessary.

Once you get into Ruby on Rails, you'll find that it's easy to set up an app. With a little planning you'll have your models ready in no time and a scaffold will handle the views and forms in seconds. Integrating gems takes only a few seconds and setting up user authentication with Devise will only take you minutes. This is a big selling point for me now that I've set up a few projects. This blog barely took any time at all!

The last reason was because I wanted to challenge myself. Learning Node would've kept me in a JavaScript bubble. Ruby is an object-oriented scripting language and it required a different mindset going in. I didn't want to keep learning the same thing and instead wanted to learn something that perhaps is rare and different. Now that I have some of the skills, I can see the beauty of Ruby and Ruby on Rails and some of the thoughtfulness of the design. I'm learning React next as per The Odin Project (another reason I chose Rails, but that's for another time) and I started to learn a bit about Next.js on the side to get a better idea of integrating React into a fullstack app. Immediately what I learned from Rails carried over into big concepts. This motivated me to finish up and fix up some old projects with Rails, since realistically I'm doing the same things with either Ruby on Rails or Next.js. I'll still need to hook up S3, I'll still need to set up a mailing service, I'll still need to set up a user login system, or mess with a database (and maybe drop a table or two), so at the end of the day I'm not hurting myself by learning something "old" and different.

I'm thinking for my next post I'll get more into what makes Ruby on Rails useful in my mind and maybe make a quick start guide that covers some of the concepts I wish I knew going into Rails.

I'm going on vacation starting today! I won't be posting for a while, but stay tuned!