diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 6 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile.tt | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 16fbc99e7a..af3ec36064 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -271,7 +271,11 @@ module Rails end def autoloader=(autoloader) - if %i(classic zeitwerk).include?(autoloader) + case autoloader + when :classic + @autoloader = autoloader + when :zeitwerk + require "zeitwerk" @autoloader = autoloader else raise ArgumentError, "config.autoloader may be :classic or :zeitwerk, got #{autoloader.inspect} instead" diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt index a1f1224a45..783254b54d 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile.tt +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile.tt @@ -36,9 +36,7 @@ gem 'bootsnap', '>= 1.4.0', require: false # gem 'rack-cors' <%- end -%> -<% if RUBY_ENGINE == "ruby" -%> -gem "zeitwerk", ">= 1.0.0" - +<% if RUBY_ENGINE == 'ruby' -%> group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] |