When an event listener on a DOM element throws an error, that error will be silenced and not interrupt your...

github.com

An unresponsive service can be worse than a down one. It can tie up your entire system if not handled...

There is a reasonable simple way to move data between Redis servers: Simply temporarily configure the new server as a...

CSS selectors are a very simple tool to select elements from a Nokogiri document. However, the colon in the XML...

Running Cucumber tests while your cucumber.yml is 100% valid may still produce the following error. cucumber.yml was found, but could...

We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...

betterspecs.org

betterspecs.org is a documentation on how to write better RSpec tests. Note that there are also other approaches like The...

makandra dev

With Rspec you can mock objects or functions, for example like this: expect(my_object).to receive(:my_function).and...

We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will...

makandra dev
thoughtbot.com

One of the earliest pieces of wisdom we are given as programmers is to not write duplicate code: Don’t...

makandra dev

Using git fixup helps you to speed up appending changes further back in the git history of your feature branch...

In case you want to use pry with an older version of Ruby, you can try the following configurations.

To make CSS rules dependent on the screen size, we use media queries: @media (max-width: 500px) { // rules for screen...

Ruby and Rails have several methods for creating a new object that looks like another: clone, dup, deep_dup. When...

...project= is deprecated with no replacement. It will be removed on or after 2019-12...

millarian.com

In Active Record you can use named bindings in where-conditions. This helps you to make your code more readable...

Test-Driven Development (TDD) in its most dogmatic form (red-green-refactor in micro-iterations) can be tedious. It does...

Simplecov is a code coverage tool. This helps you to find out which parts of your application are not tested...

"Everything in Ruby is an object". This is also true for nested hashes and arrays. If you copy a hash...

A recent patch level Ruby update caused troubles to some of us as applications started to complain about incompatible gem...

Chrome allows you to throttle the Network and the CPU. Both settings are useful to measure the performance of you...

When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...

Turns out, Cucumber::MultilineArgument::DataTable#diff! caches some stuff. Code of the following form will not work as intended:

github.com

Because colors improve readability so much. On Ubuntu 18.04 you can install it with sudo apt install grc