Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...
This card is a general reminder to avoid the short version of a command option in shared code. It's...
Installing gems on a server that has no access to the internet (especially rubygems.org) requires to bundle the gems into...
When you need the DOM node of a tag (e.g. to read extra attributes, or to modify the DOM near it), you can usually reference it via document.currentScript. However, document.currentScript is unsupported in ancient browsers, like Internet Explorer 11 or wkhtmltopdf's Webkit engine. If you are not running async scripts, you can easily polyfill it: document.scripts[document.scripts.length - 1] It works because document.scripts grows with each tag that was evaluated. That is also the reason why this solution will not work reliably for async code. Demo: https://codepen.io/foobear/pen/poRLxQm
In newer passenger versions the output of passenger -v has changed. capistrano-passenger tries to parse the version and now...
To attach files to your records, you will need a new database column representing the filename of the file...
Ruby 3.0 introduced a breaking change in how it treats keyword arguments. There is an excellent blog post on the...
I really love to use the shortcuts CTRL+Alt+ Arrow Left and CTRL+Alt+ Arrow Right to navigate through the...
When you have a hex color code, you can easily convert it into its RGB values using plain Ruby.
We prefer to run our end-to-end tests with headless Chrome. While it's a very stable solution overall...
When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...
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...
5.4.0 2021-02-01 Compatible changes Add geordi branch command that checks out a feature branch based on a story...
We had the issue, that a VCR spec failed, after updating CarrierWave from version 0.11.0 to 1.3.2. In this version...
CarrierWave comes with a set of default configuration options which make sense in most cases. However, you should review these...
The pages […] allow you to see different types of mixed content and test how they behave in your browser. The...
Sometimes you want to have a time in a given timezone independent from you Rails timezone settings / system timezone. I...
Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...
By default, your terminal emulator (Gnome Terminal, Terminator, etc.) sets some kind of window title to reflect the shell type...
Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...
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...