Using rack-mini-profiler (with Unpoly)

Posted 7 days ago by Niklas Hä..

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

Ruby: How to connect to a host with expired SSL certificate

Posted 15 days ago by Arne Hartherz.

If you need to make an HTTPS connection to a host which uses an expired certificate, do not disable certificate...

List of handy Ruby scripts to transcode different file types (often by using GPT)

Posted About 1 month ago by Michael Leimstädtner.

It's 2024 and we have tools like ffmpeg, imagemagick and GPT readily available. With them, it's easy to...

Rails: Testing the number of database queries

Posted 3 months ago by Dominik Schöler.
github.com

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

Maintaining custom application tasks in Rails

Posted 3 months ago by Emanuel.

Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts

Disable PostgreSQL's Write-Ahead Log to speed up tests

Posted 4 months ago by Michael Leimstädtner.
edgeapi.rubyonrails.org

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

open-next-failure: An alias to speed up test debugging

Posted 4 months ago by Michael Leimstädtner.

Getting an entire test suite green can be a tedious task which involves frequent switches between the CLI that is...

Capistrano 3: Running a command on all servers

Posted 4 months ago by Dominik Schöler.

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

Gitlab: How to cancel redundant pipelines

Posted 4 months ago by Emanuel.

In the Gitlab settings the flag Auto-cancel redundant pipelines is enabled by default. This auto-cancels jobs that have...

Livereload + esbuild

Posted 5 months ago by Tobias Kraze.

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

Solving "TypeError (nil can't be coerced into Integer)" in the Rails console / IRB

Posted 6 months ago by Dominik Schöler.

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

Debug MiniMagick calls in your Rails app

Posted 6 months ago by Dominic Beger.

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

Spreewald, Cucumber: Selector for the nth element

Posted 6 months ago by Felix Eschey.

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

How to make sure that manual deploy tasks (scheduled in Pivotal Tracker) are executed on deploy (with Capistrano)

Posted 6 months ago by Dominik Schöler.

We regularly have tasks that need to be performed around a deploy. Be it to notify operations about changed application...

RSpec: Efficiently rerunning failed examples during development

Posted 7 months ago by Martin Schaflitzl.
rspec.info

Note Don't use reruns as a mean to work around flaky tests. You should always try to fix those...

Use rbenv-each to run a command for every installed Ruby version

Posted 7 months ago by Michael Leimstädtner.
github.com

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

Don't use log level :debug in your production environments

Posted 7 months ago by Jakob Scholz.

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

Split your parallel tests by execution time and keep execution logs up to date

Posted 7 months ago by Felix Eschey.

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

Lightning Talk: Coverage based Test Case Prioritization in Ruby on Rails

Posted 7 months ago by Felix Eschey.
github.com

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

Do not pass params directly into url_for or URL helpers

Posted 7 months ago by Arne Hartherz.

Rails' url_for is useful for generating routes from a Hash, but can lead to an open redirect vulnerability.

CarrierWave: Processing images with libvips

Posted 9 months ago by Henning Koch.

When you write your next CarrierWave uploader, consider processing your images with libvips instead of ImageMagick. Reasons for libvips

RubyMine: Fixing "Rubocop returned exit code -1. See the logs for details"

Posted 9 months ago by Dominik Schöler.

When RubyMine reports Rubocop returning "exit code -1", upgrading Rubocop can be the fix: gem install rubocop "The logs" can...

Best practice: How to manage versions in a Gemfile

Posted 9 months ago by Emanuel.

It most cases it's not necessary to add a version constraint next to your gems in the Gemfile. Since...

Local deployment after pipeline succeeds

Posted 9 months ago by Michael Leimstädtner.

If you have a fully functional CI pipeline but no CD, you might find yourself frequently waiting for CI (with...