When changing the glibc version, it's possible that the upgrade also includes changes to how locales work.

Since I use this a lot in my daily work and there were no scripts working properly for me, I...

In a web application you sometimes have tasks that can not be processed during a request but need to go...

For Rails models where only one of multiple attributes may be filled out at the same time, there is no...

I recently enjoyed debugging a Cucumber step that tried to be retryable using a patiently block: Then /^"([^"]*)" should( not)? be...

I encountered a unlucky behavior of byebug 11.1.3 (the most recent version at time of writing) when using it with Rails 6 and it's new autoloading component, zeitwerk. There...

relishapp.com

In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...

Building application assets with esbuild is the new way to do it, and it's great, especially in combination with...

You can use local copies of gems in your Gemfile like this: gem 'spreewald', path: '~/gems/spreewald' As soon as you...

Bundler allows you to specify the name of the Gemfile you want to bundle with the BUNDLE_GEMFILE environment variable...

makandra dev

A lesser known fact about PG enums is that they are ordered. This can be really handy when values have...

island94.org

Rails 5.2 soft-deprecated the storage of secrets in secrets.yml in favor of a new thing, credentials.yml.enc. Rails 7.1 deprecated...

IRB 1.2 (shipped with Ruby 2.7, but works on 2.5+) brings pretty syntax highlighting and multiline cursor navigation. However, pasting...

The Node Version Manager allows installing multiple NodeJS versions and switching between them. By default, it does not automatically switch...

...between added? and of_kind? While added? might feel more natural to use, it behaves differently than of_kind? because it also compares options from the validation error. of_kind...

developer.mozilla.org

...methods usually don't print background colors. In most cases this is the desired behavior, because you don't want to spend tons of ink printing the background of a...

If you ever need to restore exact records from one database to another, Marshal might come in handy. Marshal.dump is...

Besides Plotting graphs in Ruby with Gruff, which comes handy for many uses cases, you sometimes might need configuration for more advanced plots, e.g. for academic concerns. Then using Gnuplot...

...where each array holds the data for x-, y- or z-axis. The major benefit of numo-gnuplot is that it supports advanced numpy like array operations, like multi array...

When changing code in mailers, updating the corresponding mailer preview can be forgotten very easily. Mailer previews can be tested...

...Rails has a method ActiveRecord::Relation#merge that can merge ActiveRecord scopes. However, its behavior has never been clear, and in Rails 7 it still discards conditions on the same...

...column by the last condition. We discourage using #merge!) The best way to merge ActiveRecord scopes is using a subquery: scope_a.where(id: scope_b) It is a little less concise...

workingdraft.de

The robots.txt file and HTML tag can be used to control the behavior of search engine crawlers. Both have different effects. robots.txt Marking a URL path as "disallowed" in robots.txt...

...follow redirects to get the desired response. This is supported but not the default behavior. You can do so by using the .follow method. This follows redirects for the following...

Creating records in specs can be so fast that two records created instantly after one another might have the same...

...Middleman brings Haml, Sass, helpers etc. However, it can be configured to do even better. This card is a list of improvement hints for a Rails developer. Gemfile

...helpers in a helpers {...

...} block. However, this does not scale very well. You're best off creating a /helpers directory and putting helper files there just like you know it...