TL;DR: Rails ships two methods to convert strings to constants, constantize and safe_constantize. Neither is safe for untrusted...

In development, we store files using ActiveStorage's disk service. This means that stored files are served by your Rails...

tl;dr When a cookie includes an Expires attribute or an HTTP response includes caching headers like Expires or Cache...

developer.mozilla.org

Text fragments allow linking directly to a specific portion of text in a web document, without requiring the author to...

makandra dev

Capistrano 3 has a doctor task that will print information about Environment: Ruby, Rubygems and Bundler versions List of Capistrano...

blog.saeloun.com

Rails' fragment caching caches subtrees of an HTML document tree. While constructing that tree though, it can be really hard...

makandra dev

YJIT is Ruby's default just-in-time compiler. It is considered production-ready since Ruby 3.2 (source).

makandra dev

Git has the concept of hooks: bash scripts that are invoked at certain points in the Git lifecycle. One handy...

We recently migrated a Rails application from yarn to npm. We decided to go this step instead of upgrading to...

Canonical does not ship Ubuntu 24.04+ Vagrant images due to HashiCorps switch to the Business Source License (BSL). There is...

makandra dev

I noticed that tig 2.5.1 that is provided by Ubuntu 22.04 repositories has inferior bash completion than older versions after...

While the main goal always is to prevent long-running queries in the first place, automatic timeouts can serve as...

github.com

Ever needed to migrate data between Redis instances? Give RIOT - Redis Input/Output Tools a try. It supports migration to different...

The ActiveSupport::BroadcastLogger allows you to log to multiple sinks. You know this behavior from from the rails server command...

Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any...

esbuild comes with a minifier that is good enough for most cases. If you're looking to squeeze out as...

Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...

With this command you can run all the spec files which have been edited or added in the current branch...

Rails credentials are a way to store secrets in an encrypted YAML file. Usage is simple: each key in the...

You are given two CSS selectors that you do not control. How can you build a new selector that matches...

makandra Operations
baeldung.com

There are different kind of memory measurement metrics in Linux. These are the differences: Code Name Description vsz virtual memory...

Sometimes we have to write code that behaves differently based on the version of a specific gem or the Ruby...

makandra dev

While most Rails Apps are tied to at least one external REST API, machine-to-machine communication via GraphQL is...

mise.jdx.dev

Add apt source: apt update -y && apt install -y gpg sudo wget curl sudo install -dm 755 /etc/apt/keyrings