Tutorials





Defining gem dependencies in single file Ruby scripts
Sometimes I come across cases where I need to write a simple script which uses a gem. The simplest way to go about this is to gem install gem-name and then require 'gem-name' in your script. However, this means that you need to remember to install...


Reactive frontend UI components for Rails in pure Ruby
Motion allows you to build reactive, real-time frontend UI components in your Rails application using pure Ruby.Plays nicely with the Rails monolith you have.Peacefully coexists with your existing tech: Strong Parameters, Turbolinks, Trix, React, ...

Why validation matchers are the only Shoulda matchers I use
If you’re unfamiliar with Shoulda matchers, the premise, from the GitHub description, is: “Shoulda Matchers provides RSpec- and Minitest-compatible one-liners to test common Rails functionality that, if written by hand, would be much longer, more ...

Understanding and Implementing Bubble Sort in Ruby
You'll probably never need to implement bubble sort from scratch. Just call Array#sort! But sorting algorithms are a popular interview topic for a reason. They ask a bigger question: "Sure, you know what your code does, but do you know how it work...