mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove "circular require considered harmful" error
rails/generators should not load rails/generators/base since the latter is loading it.
This commit is contained in:
parent
2e7ee652d2
commit
b79e4223f7
2 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
||||||
activesupport_path = File.expand_path('../../../../activesupport/lib', __FILE__)
|
activesupport_path = File.expand_path('../../../../activesupport/lib', __FILE__)
|
||||||
$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
|
$:.unshift(activesupport_path) if File.directory?(activesupport_path) && !$:.include?(activesupport_path)
|
||||||
|
|
||||||
|
require 'thor/group'
|
||||||
|
|
||||||
require 'active_support'
|
require 'active_support'
|
||||||
require 'active_support/core_ext/object/blank'
|
require 'active_support/core_ext/object/blank'
|
||||||
require 'active_support/core_ext/kernel/singleton_class'
|
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/module/attribute_accessors'
|
||||||
require 'active_support/core_ext/string/inflections'
|
require 'active_support/core_ext/string/inflections'
|
||||||
|
|
||||||
require 'rails/generators/base'
|
|
||||||
|
|
||||||
module Rails
|
module Rails
|
||||||
module Generators
|
module Generators
|
||||||
autoload :Actions, 'rails/generators/actions'
|
autoload :Actions, 'rails/generators/actions'
|
||||||
|
|
|
@ -8,7 +8,6 @@ rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'rails/generators'
|
require 'rails/generators'
|
||||||
require 'rails/generators/actions'
|
|
||||||
|
|
||||||
module Rails
|
module Rails
|
||||||
module Generators
|
module Generators
|
||||||
|
|
Loading…
Reference in a new issue