SASS has an @extend keyword to inherit styles. .alert color: red &.-framed border: 1px solid red padding: 5px &.-homepage

If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...

In the past we validate and set default values for boolean attributes in Rails and not the database itself.

Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...

After upgrading to Rails 6.1.7.2 one of our apps printed a wall of warnings while booting: /var/www/app/shared/bundle/ruby/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: already...

bundler.io

Bundler so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences:

makandra dev

Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...

makandra dev

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...

We usually rely on VCR and WebMock to prevent any real network connection when running our unit tests.

If you're experiencing that your bundle install command fails with an error message like this, rubygems.org might...

greg.molnar.io

Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...

Sometimes the need arises for SSL in local development. We have guides for different webservers, this one is for puma...

github.com

Note Use yarn dedupe in Yarn v2+: https://yarnpkg.com/cli/dedupe This package only works with Yarn v1. Yarn v2 supports...

When your Rails application offers downloading a bunch of files as ZIP archive, you basically have two options:

This should be fixed in the latest LTS-branches of our mysql2 fork, 0.2.x-lts and 0.3.x-lts...

Ruby includes many standard gems that are bundled into the Ruby installation. Here is an example for the gem strscan...

makandra dev

You'll need openssl-3 or newer for servers running 22.04 Ruby version 3.1 uses by default the gem openssl...

There is a way to use multiple databases in Rails. You may have asked yourself how you're able to...

The gemspec for gems allows to add metadata to your gem, some of which have a special meaning and are...

When you need information about a gem (like version(s) or install path(s)), you can use the gem binary...

This card explains how to generate an entity relationship diagram for your Rails application. We also show how to limit...

Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

makandra dev

To ensure a consistent code style for JavaScript code, we use ESLint. The workflow is similar to integrating rubocop...

This are the steps I needed to do to add esbuild to an application that used the vanilla rails asset...