Fast rubocop autocorrection alias
The rubocop binary has a few interesting flags: rubocop (using the --parallel default ) scans the current repository for linting issues...
ASDF: A Version Manager To Rule Them All
tl;dr asdf allows you to manage multiple runtime versions with a single CLI tool and is backwards compatible by...
Rubymine: Configure CTRL + ALT + SHIFT + c to work with "Test Source Roots"
To navigate between test and test subject Rubymine requires you to set the test root sources as Test Sources Root...
Rails: Assigning associations via HTML forms
Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...
Heads up: Deployment with newly generated SSH key (using ED25519) might fail
If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...
Story Checklist Template
This is an story checklist I use to work on stories. For this purpose I extracted several cards related to...
git: find the version of a gem that releases a certain commit
Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...
Fixing wall of net/protocol warnings
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...
How to make your git aliases work with both master and main
The linked article found a simple way to rewrite legacy git aliases to make them work with differently named default...
Bundler 2.3 honors the version specified in `BUNDLED_WITH`
Bundler so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences:
Jasmine: Mocking ESM imports
In a Jasmine spec you want to spy on a function that is imported by the code under test. This...
Caution: `.includes` can make `.ids` non-unique.
This can happen with a very simple model: class Note has_many :attachments end Everything looks normal: Note.all.to_a.size # => 8 Note.all.ids.size...
GitLab: Git alias for creating a merge request on push
Git allows you to set push options when pushing a branch to the remote. You can use this to build...
ActiveType::Object: Be careful when overriding the initialize method
ActiveType::Object inherits from ActiveRecod::Base and is designed to behave like an ActiveRecord Object, just without the database...
Git: Switch
tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...
Git: Restore
tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...
Git commands to discard local changes
You have uncommited changes (you can always check by using git status), which you want to discard.
Prefer using Dir.mktmpdir when dealing with temporary directories in Ruby
Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...
How to get the git history of a file that does not exist anymore
If you want to see the git history of a project file, that doesn't exist anymore, the normal git...
Updated: Git: removing feature branch on merge
Resolve @{-1} to actual branch name. (Happens when merging "-".)
Git: removing feature branches on merge
When working with feature branches, stale branches pile up over time. It's best to remove them right after merge...
makandra tech survey - results
These are the results of the "personal tech stack survey". I've included only the most popular mentions, maybe it...
Fix for mysql2 error "Incorrect MySQL client library version! This gem was compiled for x.x.x but the client library is y.y.y."
This should be fixed in the latest LTS-branches of our mysql2 fork, 0.2.x-lts and 0.3.x-lts...
Fix: esbuild assets are missing after capistrano deploy
Issue: You have an app using jsbundling-rails and esbuild. After deploy, the assets built by esbuild are missing in...