From 2a5c116f12c7716399f5da3fe788f7e23ae67c4c Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Wed, 14 Dec 2016 14:54:59 +0900 Subject: make all rails commands work in engine Currently, all rails commands can be executed in engine, but `server`, `console`, `dbconsole` and `runner` do not work. This make all rails commands work in engine. Related to #22588 --- railties/lib/rails/command/actions.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/lib/rails/command/actions.rb') diff --git a/railties/lib/rails/command/actions.rb b/railties/lib/rails/command/actions.rb index 31b656ec31..fb80e9d997 100644 --- a/railties/lib/rails/command/actions.rb +++ b/railties/lib/rails/command/actions.rb @@ -11,6 +11,11 @@ module Rails if defined?(ENGINE_PATH) def require_application_and_environment! require ENGINE_PATH + + if defined?(APP_PATH) + require APP_PATH + Rails.application.require_environment! + end end def load_tasks -- cgit v1.2.3