You can use the config.x configuration in combination with config_for to configure global settings for your Rails 4.2+ application...

makandra dev

I recently did a quick research on how to better write down multiline statements like this: # Dockerfile RUN export DEBIAN...

edgeapi.rubyonrails.org

The linked article suggests an interesting way to speed up tests of Rails + Postgres apps: PostgreSQL allows the creation of...

This Capistrano task runs a command on all servers. bundle exec cap production app:run cmd='zgrep -P "..." RAILS_ROOT/log/production.log...

makandracards.com

A general overview about why and how we migrate can be found under Migrating from Elasticsearch to Opensearch

OpenAI is currently limiting the Audio generating API endpoint to text bodies with a maximum of 4096 characters.

#pluck is commonly used as a performant way to retain single database values from an ActiveRecord::Relation Book.pluck(:title, :price...

makandra dev

Getting CSS (and JS) live reloading to work in a esbuild / Rails project is a bit of a hassle, but...

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

Every modern Rails app should have a Content Security Policy enabled. Very compatible default The following "default" is a minimal...

While upgrading CarrierWave from version 0.11.x to 3.x, we encountered some very nasty fails. Below are the basic...

All direct child directories of app are automatically added to the eager- and autoload paths. They do NOT create a...

On the Rails console, assigning an object to a variable can lead to this strange error (without stacktrace): irb > recipient...

TLDR Using .includes or .eager_load with 1-n associations is dangerous. Always use .preload instead. Consider the following ActiveRecord...

Most of our applications use CarrierWave for file uploads. CarrierWave has an integrated processing mechanism for different file versions with...

Given you have an array column like this: create_table "users", force: :cascade do |t| t.integer "movie_ids", default: [], array...

thegnar.com

View specs are a powerful tool to test several rendering paths by their cases instead of using a more costing...

github.com

The linked rbenv plugin rbenv-each is very helpful to keep QoL gems up to date that are not part...

You don't want sensitive user data in your logs. Background Rails per default filters sensitive data like...

Disclaimer This card is a collection of guides and things to have in mind when upgrading to a specific version...

Both knapsack and parallel_tests have the option to split groups by historic execution time. The required logs for this...

github.com

For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra...

The git doc states on the difference of these two commands: git-restore[1] is about restoring files in the...

makandra dev

There are multiple ways to redirect URLs to a different URL in Rails, and they differ in small but important...