Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ever since upgrading to Ruby 2.6 (see #3873), I've experienced the following crash when running `bin/rails console`: ``` $ bin/rails c warning package.json: No license field warning No license field Running via Spring preloader in process 12917 Traceback (most recent call last): 28: from -e:1:in `<main>' 27: from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 26: from /usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 25: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load' 24: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 23: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load' 22: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load' 21: from /home/jeremy/gitting/worldcubeassociation.org/WcaOnRails/bin/rails:11:in `<top (required)>' 20: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 19: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 18: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' 17: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 16: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>' 15: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:44:in `invoke' 14: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:70:in `find_by_namespace' 13: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/behavior.rb:79:in `lookup' 12: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/behavior.rb:79:in `each' 11: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/behavior.rb:80:in `block in lookup' 10: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/behavior.rb:80:in `each' 9: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/behavior.rb:84:in `block (2 levels) in lookup' 8: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 7: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 6: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' 5: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 4: from /home/jeremy/.gem/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/console/console_command.rb:3:in `<top (required)>' 3: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 2: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 1: from /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' /home/jeremy/.gem/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require': cannot load such file -- irb (LoadError) ``` At first I thought this was a quirk of my local environment, but some Googling let me on the following journey: - https://www.reddit.com/r/rails/comments/akhmae/ruby_26_breaks_rails_console/ -> - Shopify/bootsnap#223 -> - rubygems/bundler#6929 (comment) So, this appears to be due to a bundler change, and one workaround is to explicitly add `irb` to your Gemfile. It seems like this may be fixed in a future version of bundler: rubygems/bundler#6963.
- Loading branch information