Home

Ruby

Building a Static API with Middleman

Learn to build a static API using the Middleman static site generator.

Jul 30, 2020

Access the Site Object within a Jekyll Filter

Filters are the way to make liquid work for you, but sometimes we want more context than we are given when running them.

Aug 21, 2018

Identify Liquid Bottlenecks by Profile Jekyll Builds

It's easy to let Liquid templates get away and bog down build times. Here's a quick way to find out which templates are the culprits.

Aug 19, 2018

Add a "reload!" Method to your Ruby Console

Once you are running a console in your ruby project, it's nice to not have to restart the console session every time you make a change.

Aug 07, 2018

Add a Console to your Ruby Project

A powerful way to debug Rails applications is in using the Rails console. But even when you're not using Rails for your Ruby project, you can still have a console.

Aug 06, 2018

3 Methods for Logging Output During Ruby Processes

Logging output during ruby processes is hugely beneficial for gaining insight into running code.

Jul 13, 2018

Don't Overthink Slugs in Ruby/Rails

It can take some tricky logic to transform unpredictable characters into a URL-friendly string. But with Rails, you don't need to worry about.

Jul 11, 2018

4 Ways to Write and Run a Ruby Script

Ruby is fun to write, and it's pretty easy to use Ruby to perform ad hoc services for you. Here are a few approaches.

Jul 02, 2018

Search and Replace Multiple Lines in Multiple Files in Ruby

There are many tools for searching and replacing, but most don't support changing multiple lines in one process.

Jul 02, 2018

Run a Local Web Server with Ruby

No need to mess with Apache or Nginx to run a web server on your local machine. Just use this ruby command.

Jun 21, 2018