I recently noticed that better_errors allows you to to open files from within your favorite editor. However it was...

Debugging your integration tests, that run a headless Chrome inside a docker image, is tricky. In many cases you can...

makandra dev

The rubocop binary has a few interesting flags: rubocop (using the --parallel default ) scans the current repository for linting issues...

Every Rails response has a default ETag header. In theory this would enable caching for multiple requests to the same...

tl;dr asdf allows you to manage multiple runtime versions with a single CLI tool and is backwards compatible by...

Capybara has a variety of finder methods like find_button to help you look up DOM elements. There are also...

Maintaining larger projects makes it more difficult to balance refactoring and upgrade tasks according to its actual value. Consider to...

By activating strict_loading you force developers to address n+1 queries by preloading all associations used in the index...

ruby-doc.org

We will achieve this by creating a block accepting method to optionally create and then lock a .lock File of...

github.com

Since Ruby 3.2.0 you can measure coverage support for eval statements and support has been added for the simplecov gem...

SASS has an @extend keyword to inherit styles. .alert color: red &.-framed border: 1px solid red padding: 5px &.-homepage

If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...

This is a checklist I use to work on issues. For this purpose I extracted several cards related to the...

In the past we validate and set default values for boolean attributes in Rails and not the database itself.

Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...

After upgrading to Rails 6.1.7.2 one of our apps printed a wall of warnings while booting: /var/www/app/shared/bundle/ruby/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: already...

bundler.io

Bundler so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences:

Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...

We usually rely on VCR and WebMock to prevent any real network connection when running our unit tests.

tl;dr You should decouple migrations from models by embedding models into the migration. To use STI in this scenario...

If you're experiencing that your bundle install command fails with an error message like this, rubygems.org might...

If you need to convert an SVG source to PS or EPS, the most common suggestion on the interwebs is...

greg.molnar.io

Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...