This project is archived and is in readonly mode.
Dependencies shouldn't swallow errors from required files.
-
Michael Koziarski
Plz send patches newb
-
Michael Koziarski
- Milestone set to 2.1.1
- Assigned user set to Michael Koziarski
- Title changed from Incorrect alias_method call in controller causes misleading const_missing exception to Dependencies shouldn't swallow errors from required files.
This is frustrating as it masks the true error. I get similar behaviour when I use my 'apple ruby' which doesn't have rmagick installed.
Dependencies shouldn't drop the load error on the ground, it should at the very least show what the original error was, if not raise the original exception
-
Roger
+1 for wishing this didn't occur. Some work has been done on
http://dev.rubyonrails.org/ticke...
for it [though nothing really satisfactory].
-
Tom Ward
I've only found one way to reproduce this; In production mode, if an error occurs on the first require of a file, on subsequent requires the error will mask the real problem. I've created a patch that fixes this, but there may well be other ways to make this occur.
If anyone has any other reproducible examples, I'm happy to take a look.
-
Roger
I believe it happened to me if there was an error in a plugin loading. Like a syntax error in one of the files. The 'real' error message was never output.
In one instance, it was because the plugin filename didn't use rails'ish style syntax [was name acts-as-something instead of acts_as_something]. I'll let you know if I run into it again.
-R
-
Tom Ward
That specific problem (the plugin-with-hyphenated-name) loading issue was fixed in #24 Prevent Dependencies.new_constants_in cleanup code masking real error when co.... I got tripped up by that too.
-
Santiago Pastorino
- State changed from new to stale
- Tag set to 2.0-stable, actionpack, activesupport, bug, const_missing, controller, core_ext, dependencies, edge, patch, tests
- Importance changed from to Low
