When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

makandra dev

When your application is open for public sign up and sends out transactional e-mails to a large number of...

makandra dev

In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...

json is part of the standard library of Ruby and deals with JSON, obviously. As you know, JSON is the...

We had the issue, that a VCR spec failed, after updating CarrierWave from version 0.11.0 to 1.3.2. In this version...

Sometimes you want to have a time in a given timezone independent from you Rails timezone settings / system timezone. I...

stackoverflow.blog

A rough guide how to implement a REST API. The discussion here includes some interesting points as well: Timestamps: ISO8601...

makandra dev

I just finished migrating a project from the Asset Pipeline to Webpacker, this is what my diff to master looks...

Ruby offers monkey patching methods in order to change the behavior of a library if there's no better way...

In long diffs, it can become impossible to spot small changes in larger blocks of moved code. This may be...

Headless Chrome is a way to run the Chrome browser without a visible window. Configuring Capybara Configure the Capybara driver...

When deploying a Rails application that is using Webpacker and Capistrano, there are a few configuration tweaks that optimize the...

mtlynch.io

Why improve your code reviews? Improving code review technique helps your reviewer, your team, and, most importantly: you.

makandra dev

This card is mainly an explanation how variable fonts work in CSS, not necessarily a recommendation to actually use them...

curl-to-ruby is a handy tool that converts your curl command to ruby code that uses the Net::HTTP...

Here is a short summary of Cucumber hooks in Ruby taken from https://github.com/cucumber/cucumber-ruby. Note that the BeforeStep is...

If a model inherits from others or uses many concerns / traits, it might be hard to see in the code...

news.ycombinator.com

This is an extract from the linked article. It shows an approach on how to implement encrypted passwords with the...

A flat folder structure can be cool if you have only a few folders but can be painful for huge...

When you use Sentry to monitor exceptions, an important feature is Sentry's error grouping mechanism. It will aggregate similar...

Rails middlewares are small code pieces that wrap requests to the application. The first middleware gets passed the request, invokes...

makandra dev

If you have a Ruby Pathname, you can use the method :/ to append filepaths to it. With this method, Ruby...

Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...

If you want to prevent that two processes run some code at the same time you can use the gem...