Railsers: I have this issue: http://brian.pontarelli.com/2006/08/01/ror-plugin-woes/> The RoR plugin mechanism is just plain horrible. Plugins do not work like > most ruby classes because they are loaded in a slightly convoluted way and > most errors end up getting swallowed by RoR. Of course this can be fixed, > but it is really annoying and makes programming even more stone-age than > it should be. You end up with errors like this:/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123: in `const_missing'': uninitialized constant AjaxValidation (NameError) from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing'' from script/../config/../vendor/plugins/ajax_validation/init.rb:3: in `load_plugin'' ...> The issue here is NOT that AjaxValidation isn''t defined. Instead, it is > that in the definition of AjaxValidation an error has occurred and this > caused the load of AjaxValidation to completely fail AND there is > absolutely no logging of the error that caused AjaxValidation to fail. So, > you resort to writing to stdout each line of code to figure out where the > problem is. That sucks.So, is there any QnD fix to get the real error message out of the bogus "unitialized constant" message? And is there any progress afoot to fix this issue? -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> I have this issue: > > http://brian.pontarelli.com/2006/08/01/ror-plugin-woes/I don''t seem to have that issue - I''m still interested if it''s resolved. I generated a plugin with script/generate plugin, then I tossed a correctly-named class into the lib folder, and I put its first test in the test folder. The error message is NameError: uninitialized constant MyClassTest::MyClass That simply means I need to require ''my_class'', right? So I crow-bar it in with this: require File.dirname(__FILE__) + ''/../lib/yar_wiki.rb'' Oookay. Now something in MyClass depends on RAILS_ROOT, so I add that. Then MyClass misses YAML, and I skid to a halt. Why am I rebuilding the Rails environment for this test case? I''m runing rake test in the folder vendor/plugin/my_class, so The System should just take care of all this paperwork, like the rest of Rails, right? -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---