Load bundled gems on expected version by xjunior · Pull Request #859 · sds/overcommit

Copy link

Contributor

@xjunior xjunior commented

Jan 23, 2025

edited

Loading

Fixes #789

psych is no longer a default gem, but current and old ruby still ships with it. When we require 'yaml', we activate that gem in whatever version that is bundled with ruby. Later on, we load bundler, and we Bundler.setup, which will then activate whatever version specified in the lock file. More often than not, they might not match.

The approach in this PR is to strip the yaml dependency completely from the hook scripts, while retaining the ability to configure the Gemfile using it.

wadewinningham, Victor-Oliveira, and garettarrowood reacted with thumbs up emoji wadewinningham and Victor-Oliveira reacted with heart emoji