Even if you don't make any beginner mistakes like N+1 queries or missing DB indices, some requests can...

ActiveStorage does not provide any built-in way of implementing authentication for the available DirectUpload endpoint in Rails. When using...

How to retrieve connection information from memcached. printf "stats\nquit\n" | nc 127.0.0.1 $MEMCACHED_PORT | grep connection

When Ruby objects are inspected in any modern IRB, some objects (like ActiveRecord instances) are rendered with neat colors and...

stevenhicks.me

Sometimes you want to write a test for a business rule that's based on multiple variables. In your goal...

makandra dev
github.com

I was recently asked to optimize the response time of a notoriously slow JSON API endpoint that was backed by...

makandra Operations
manned.org

If you want to use rsync to transfer files that don't belong to your user to another system you...

This card describes four variants, that add a more intuitive workflow when working with nested attributes in Rails + Unpoly:

Debugging performance issues in your Rails app can be a tough challenge. To get more detailed insights consider using the...

makandra Operations

jq is great when dealing with JSON data. Check out the official jq Manual. Content Select only specific keys

github.com

There are a few tools to combat the dreaded n+1 queries. The bullet gem notifies you of missing eager...

Tested on Ubunut 22.04 1. Opener script Create a file ~/.local/bin/coverage_zip_opener with: #!/bin/bash tmp_folder="/tmp/coverage-report-opener" if [ -z "$1" ]

Your development server is usually running on an insecure HTTP connection which is perfectly fine for development.

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

stackoverflow.com

For some reason you have to pass the password hash if you want to create a role in postgres. To...

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

The recommended additional setup of the spreewald gem, a useful set of cucumber steps, includes adding a file for defining...

ruby-doc.org

Do you remember finding where a method is defined? I recently learned from a senior colleague that Method objects are...

Besides Plotting graphs in Ruby with Gruff, which comes handy for many uses cases, you sometimes might need configuration for...

github.com

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

atlassian.com

Git log offers useful options for filtering. This card provides a short overview. By message Only commits that include a...

Sometimes you'll find yourself with a set of tasks that require similar code for different models. For example, if...

Splitting up commits makes the process of reviewing often easier, since you can create several merge requests or review every...

makandra dev
gist.github.com

Context and further resources Even though you can get 90% of debugging done with up to 5 basic byebug commands...