A primer on vector graphics For rastered image formats like JPG or PNG, each pixel is basically drawn on a...

There is a kind of features in web applications that hinder automated integration tests. Examples include cookie consent banners or...

Rubygems supports a 2FA for your account. Once enabled you need to provide your personal OTP code for every release...

api.rubyonrails.org

ActiveSupport (since 4.1) includes test helpers to manipulate time, just like the Timecop gem: To freeze the current time, use...

The Ruby standard lib ships with a YAML Parser called Psych. But serializing and deserializing data seems not as obvious...

Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...

makandra dev

There is a practical short list for valid/invalid example email addresses - Thanks to Florian L.! The definition for valid emails...

Most of the time it is a tedious task to apply a code style guide to an existing code...

There are a few ways to access view helpers from the Rails console. The easiest way is the helper shortcut...

You can use constraints in your routes.rb to avoid getting ActionView::MissingTemplate errors when wrong routes are called. Instead, the...

github.com

I got this error after upgrading Ruby from 2.4.5 to 2.6.4 when I opened the Rails console - rails server still...

When using Chrome for Selenium tests, the chromedriver binary will be used to control Chrome. To debug problems that stem...

github.com

With this gem your transaction blocks raise an error when they have side effects that cannot be rolled back.

makandra dev

The ruby sass gem also installs a command line tool to convert to and from SCSS. Use it for a...

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...

When upgrading Clearance, pay attention whether the password hashing strategy might have changed. Old clearance versions (< 1.0) used SHA1-encrypted...

MariaDB (and MySQL) is released in different versions with different behaviors. For backwards compatibility this can be managed with the...

You can share a state in Ruby with global variables. Even if you should avoid them whenever possible, for debugging...

makandra dev

General hints on the DOM the root of the DOM is document custom elements inherit from HTMLElement. They need a...

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...

Sometimes, due to git or other "accidents", important files get deleted or overwritten. At a state when even Ctrl+Z...

blog.cloudflare.com

Two weeks ago, Cloudflare was struck by a global outage that lasted ~30 minutes. The incident was rooted on a...

makandra dev

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...

github.com

From Ubuntu 17, rbenv fails to install Ruby below 2.4 because of a mismatching OpenSSL dependency: it needs libssl1.0-dev for...