We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 031db8a commit 49c2334Copy full SHA for 49c2334
toys-core/lib/toys/utils/gems.rb
@@ -304,6 +304,13 @@ def find_lockfile_path(gemfile_path)
304
end
305
306
def setup_bundle(gemfile_path, groups: nil, retries: nil)
307
+ # Ensure certain built-in gems that may be used by bundler/rubygems
308
+ # themselves are preloaded so they can be included in the modified
309
+ # gemfile. This prevents a gem version mismatch if bundler/rubygems
310
+ # loads a version of the gem during the bundler setup code (i.e. after
311
+ # the modified gemfile is created) but the gemfile lock itself calls
312
+ # for a different version.
313
+ require "uri"
314
# Lock the bundler version, preventing bundler's SelfManager from
315
# installing a different bundler and taking over the process.
316
::ENV["BUNDLER_VERSION"] = ::Bundler::VERSION
0 commit comments