From 272f7c29e2105f33a6f4131cfaf423bfd05b6040 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Fri, 4 Apr 2014 04:29:50 +1030 Subject: [PATCH] Explicitly load Kernel#y when starting a console Previously, we relied on the IRB-detection in Psych itself. But that doesn't work when we're running under spring: the application boots (and thus psych is required) before we switch to console mode and load IRB. Fixes #14587. --- railties/lib/rails/engine.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 5661094d95..c38cc3b5e5 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -430,6 +430,7 @@ def initialize # Check Rails::Railtie.console for more info. def load_console(app=self) require "pp" + require "psych/y" require "rails/console/app" require "rails/console/helpers" run_console_blocks(app) -- GitLab