Ruby + ActiveSupport = 🧘🏻‍♀️

Flavio Wuensche
4 min readJun 26, 2023

Use ActiveSupport methods and improve your ruby coding experience.

Photo by Ben White on Unsplash

Ruby and Rails are not the same thing 🫢

People often get confused between Rails and Ruby, and it’s understandable why. Rails is a web application framework built using the Ruby language, so they go hand in hand. Ruby is the programming language, known for its simplicity and readability, while Rails is a framework that makes web development easier mainly by encouraging convention over configuration.

One reason for the confusion is that Rails developers often use ActiveSupport, a Ruby library that comes bundled with Rails. It provides helpful methods for things like date manipulation and string inflections. These methods are super convenient when working on Rails projects, but they’re not available by default in pure Ruby. So, sometimes developers try to use these Rails-specific methods in regular Ruby scripts and get stuck.

What some don't realize, is that you can have your cake and eat it too 🍰

Long live ActiveSupport 🙏

While ActiveSupport methods are primarily designed to enhance Ruby within the Rails framework, there are cases where you might find them useful even when writing pure Ruby scripts. ActiveSupport provides a collection of handy methods…

--

--

Flavio Wuensche
Flavio Wuensche

Written by Flavio Wuensche

Building an open-source tool to keep track of technical debt on large codebases 🍒 cherrypush.com

No responses yet