From 5388fee718994adabfde20020652d03d67d97048 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 4 Sep 2012 01:17:38 +0200 Subject: revised the exception message "Expected #{file_path} to define #{qualified_name}" Users need to know the ultimate problem here is that AS was trying to autoload a constant and it failed. --- activesupport/lib/active_support/dependencies.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 45c9f0472a..d6bc95a522 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -487,7 +487,7 @@ module ActiveSupport #:nodoc: raise "Circular dependency detected while autoloading constant #{qualified_name}" else require_or_load(expanded) - raise LoadError, "Expected #{file_path} to define #{qualified_name}" unless from_mod.const_defined?(const_name, false) + raise LoadError, "Unable to autoload constant #{qualified_name}, expected #{file_path} to define it" unless from_mod.const_defined?(const_name, false) return from_mod.const_get(const_name) end elsif mod = autoload_module!(from_mod, const_name, qualified_name, path_suffix) -- cgit v1.2.3