Nimble Industries

Tagruby

The Cost of Ignoring the Rails Way

T

One of my consulting clients recently asked me to investigate a bug causing an unhandled exception in their production Rails app. The Bugsnag issue looked like countless others any Rubyist has no doubt reviewed before: undefined method `invitation_accepted_at' for nil:NilClass. This type of error indicates the code was expecting an object to have been returned when it wasn’t. A method was being...

Dependabot is Now Free and It’s Amazing

D
Dependabot automatically upgrades your software dependencies

GitHub acquired Dependabot and made it free so we tried it out. The results were better than expected. We have long been advocates for consistent software maintenance. It might seem obvious, but software simply must be maintained and kept up to date with its dependencies or it risks atrophying until it becomes an unmaintainable pile of trash. Dependabot is an excellent tool for preventing...

Stop using Time.now and Date.today

S

When reviewing Rails apps, I often find many uses of Time.now and Date.today, each of which comes from Ruby itself. Although these methods seem convenient and accessible, they should be avoided inside of Rails apps, as they aren’t converted to the local time zone set inside Rails. Imagine the following (admittedly naive) method inside an Order model: def shipped? shipping_date < Date...

Dump Google Analytics and use Ahoy to track your Rails app traffic

D

StatusGator is built on Ruby on Rails, a popular choice for rapid web application development for more than a decade. One of the many benefits of Rails is its rich ecosystem of open source gems which can provide massive value quickly. We discovered one such gem, Ahoy, on our recent quest to understand how our users find out about StatusGator. StatusGator gets about 3,000 visitors and 20 sign ups...

Nimble Industries