From b79e4223f7b9ddcda1d64ceb8807f91de16e100f Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Fri, 1 Nov 2013 11:41:02 +0100 Subject: [PATCH] Remove "circular require considered harmful" error rails/generators should not load rails/generators/base since the latter is loading it. --- railties/lib/rails/generators.rb | 4 ++-- railties/lib/rails/generators/base.rb | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 6b34db3e3f..1c0952cc55 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -1,6 +1,8 @@ activesupport_path = File.expand_path('../../../../activesupport/lib', __FILE__) $:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path) +require 'thor/group' + require 'active_support' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/kernel/singleton_class' @@ -9,8 +11,6 @@ require 'active_support/core_ext/hash/deep_merge' require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/string/inflections' -require 'rails/generators/base' - module Rails module Generators autoload :Actions, 'rails/generators/actions' diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 681332a144..a9638ce5ab 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -8,7 +8,6 @@ rescue LoadError end require 'rails/generators' -require 'rails/generators/actions' module Rails module Generators