Fast rubocop autocorrection alias

Posted 11 months ago by Michael Leimstädtner.

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

Posted 11 months ago by Julian.

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"

Posted 12 months ago by Emanuel.

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

Posted 12 months ago by Emanuel.

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

Posted About 1 year ago by Fabian Schwarz.

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

Story Checklist Template

Posted About 1 year ago by Felix Eschey.

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

Posted About 1 year ago by Daniel Straßner.

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

Posted Over 1 year ago by Henning Koch.

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

Posted Over 1 year ago by Michael Leimstädtner.
phili.pe

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`

Posted Over 1 year ago by Klaus Weidinger.
bundler.io

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

Jasmine: Mocking ESM imports

Posted Over 1 year ago by Henning Koch.

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.

Posted Over 1 year ago by Klaus Weidinger.

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

Posted Over 1 year ago by Martin Schaflitzl.

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

Posted Over 1 year ago by Jakob Scholz.
github.com

ActiveType::Object inherits from ActiveRecod::Base and is designed to behave like an ActiveRecord Object, just without the database...

Git: Switch

Posted Over 1 year ago by Julian.

tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...

Git: Restore

Posted Over 1 year ago by Julian.

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

Posted Over 1 year ago by Felix Eschey.

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

Posted Over 1 year ago by Emanuel.

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

Posted Over 1 year ago by Max E..

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

Posted Over 1 year ago by Dominik Schöler.
makandracards.com

Resolve @{-1} to actual branch name. (Happens when merging "-".)

Git: removing feature branches on merge

Posted Over 1 year ago by Dominik Schöler.

When working with feature branches, stale branches pile up over time. It's best to remove them right after merge...

makandra tech survey - results

Posted Almost 2 years ago by Tobias Kraze.

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."

Posted Almost 2 years ago by Tobias Kraze.

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

Posted Almost 2 years ago by Tobias Kraze.

Issue: You have an app using jsbundling-rails and esbuild. After deploy, the assets built by esbuild are missing in...