Skip to content

Commit 9f7d072

Browse files
committed
Ensure bundler is required when used
Spring.gemfile is using bundler, the require is needed in certain cases in which Bundler is not already loaded. Specifically when spring is loaded via Spring::ApplicationManager the #start_child method wraps the call inside Bundler.with_original_env restoring a RUBYOPT env variable without the bundler require. That in turn causes errors like: /Users/elia/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/spring-2.1.1/lib/spring/configuration.rb:10:in `gemfile': uninitialized constant #<Class:Spring>::Bundler (NameError)
1 parent 577cf01 commit 9f7d072

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/spring/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require "spring/errors"
2+
require "bundler"
23

34
module Spring
45
class << self

0 commit comments

Comments
 (0)