Repository navigation
Allow rake 13 and set up the bundle before the specs load the gem - #183
Merged
danielpclark merged 1 commit intoOct 4, 2026
Merged
Conversation
The gem depended on `rake ~> 12.3`, which keeps it out of any application that has moved to rake 13 (Rails 6 and later), and locked this project's own bundle to rake 12.3.x. Nothing here needs rake 12: thermite asks for `rake >= 10`, and the whole suite passes with rake 13.4.2. The pinned rake also broke running mspec outside `bundle exec`: spec/init loaded faster_path, which pulls in rake through thermite, before Bundler had set up the bundle, so the newest installed rake got activated and Bundler then refused to continue with "You have already activated rake 13.0.1, but your Gemfile requires rake 12.3.3". Setting up the bundle first makes the rake in Gemfile.lock the one that is loaded, whichever version it is. Fixes #180 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXvfgWzuq28ewqT3AyhX4Z
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #180.
What
faster_path.gemspec: the runtime dependency on rake becomes>= 12.3instead of~> 12.3.spec/init.rb:require 'bundler/setup'right afterBUNDLE_GEMFILEis set, beforefaster_pathis loaded.Why
rake ~> 12.3keeps the gem out of any application that has moved on to rake 13 (Rails 6 and later lock rake 13), the same kind of problem thebundler ~> 1.12pin caused in #174 / #178. Nothing here needs rake 12: thermite 0.13.0 asks forrake >= 10, and the whole suite passes with rake 13.4.2.The pin was also the root cause of #180.
spec/init.rbloadedfaster_path, which pulls in rake through thermite, before Bundler had set up the bundle. So the newest rake installed on the machine was activated first, and Bundler then refused with "You have already activated rake 13.0.1, but your Gemfile requires rake 12.3.3". This reproduces today on a plainbundle installcheckout withbundle exec rake test(Ruby 2.7.8 ships rake 13.0.1), and CI only avoided it becausesetup-rubyinstalls the bundle into a vendored path that hides the system rake. Loading the bundle first makes the rake inGemfile.lockthe one that is loaded, whichever version that is.Verification
With Ruby 2.7.8 on Linux,
TEST_MONKEYPATCHES=true WITH_REGRESSION=true ENCODING=true bundle exec rake test(cargo tests, minitest, rubocop, pbench, mspec) passes both with rake 12.3.3 and with rake 13.4.2 inGemfile.lock. The exact command from the issue,ruby -r spec/init spec/mspec/bin/mspec-run --format spec core/file/basename ..., run withoutbundle exec, now passes too.🤖 Generated with Claude Code
https://claude.ai/code/session_01CXvfgWzuq28ewqT3AyhX4Z
Generated by Claude Code