Nice work. Thanks for looking into this. Now I know I'm not crazy. On 9/12/06, choonkeat <[EMAIL PROTECTED]> wrote: > This is actually related to a bigger issue that the files (*helper.rb) are > not loaded in a consistent order. Hence the unpredictable nature of > problems. > > Patch submitted . > > > > On 9/12/06, choonkeat <[EMAIL PROTECTED]> wrote: > > > > Its really wierd, I have not met the problem (and still doesn't) on my > main machine. But my new box experiences the problem. Both machines compiles > ruby from tarball. > > > > The problem is with cyclic dependencies between prototype_helper.rb (which > requires javascript_helper.rb) and javascript_helper.rb (which requires > prototype_helper.rb AND expects PrototypeHelper defined) > > > > If prototype_helper.rb(1) is loaded first, it will > > > > > > load javascript_helper.rb(2), which will... > > load prototype_helper.rb(3) which will... > > skip reloading javascript_helper.rb (since #2 is ongoing) and... > > proceed with the rest of the code to define PrototypeHelper... > > exits #2... > > proceeds with #2 which expects PrototypeHelper (it is defined by #3)... > > exits #2... > > proceeds with #1 which redefines PrototypeHelper (since its defined > already) with the same code > > everything proceeds smoothly > > If javascript_helper.rb(1) is loaded first, it will > > > > > > load prototype_helper.rb(2) which will... > > > > load javascript_helper.rb(3) which will... > > > > skip reloading of prototype_helper.rb (since #2 is ongoing) and ... > > > > proceed with the rest of the code which requires PrototypeHelper defined - > but its not done by #2 yet > > so it all dies > > Makes me wonder how it worked in the machines that does? > > > > Not sure what's the best solution, submitted a patch to move the require > statement AFTER defining PrototypeHelper. Or we should just remove the > require statement all together. > > > > In the meantime, to use edge, I added this line to the top of my > config/environment.rb > > require 'action_view/helpers/prototype_helper' > > > > Missing anything? > > > > > > > > On 9/9/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > > > > > > I was seeing similar things too when poking around the files. > > > > > > Thanks for the information, I'll try it out and see if I can resolve > > > the problem locally. > > > > > > Andrew > > > > > > On 9/8/06, Solomon White < [EMAIL PROTECTED]> wrote: > > > > > > > > I'm seeing this error on two of my three production boxes (which are > > > > all identical, so it's confusing as to why it's only happening on two > > > > of them). I dug into the helpers a little and found that the problem > > > > is with a couple of the helpers (found in actionpack/lib/action_view/ > > > > helpers). > > > > > > > > Specifically, at the top of javascript_helper.rb, there is a require > > > > of prototype_helper, and at the top of prototype_helper.rb, there is > > > > a require of javascript_helper. This seems like it should work, but > > > > it's throwing the error you mention below when I try to start > > > > mongrel. I've been able to hack, er, work around it by replacing one > > > > of the requires with the actual file content. Here's what I'm doing > > > > step-by-step: > > > > > > > > 1) copy the contents of prototype_helper.rb > > > > > > > > 2) remove the "require ... prototype_helper" line from the top of > > > > javascript_helper.rb (line 2) > > > > > > > > 3) paste the prototype helper content copied in step one in place of > > > > the line you just removed > > > > > > > > 4) remove the "require ... javascript_helper" line from the content > > > > you just pasted in. > > > > > > > > I suspect this is related to the new dependency code, but I'm not > > > > sure. I would like to submit a bug report, but I'm not sure how to > > > > construct a unit test for it, since it works fine on one box and > > > > fails on the other two (identical) boxes. If it matters, I'm running > > > > this on Fedora Core 5 / x86_64 machines, and we're frozen at rev. > > > > 4883 of rails. > > > > > > > > On Sep 7, 2006, at 9:26 PM, Andrew Kaspick wrote: > > > > > > > > > > > > > > I didn't incorporate my changes into the frozen edge, so that's not > > > > > the problem. > > > > > > > > > > I guess I'll assume my enivronment is screwed up somehow when it > comes > > > > > to using edge if others are having no issues. > > > > > > > > > > I'll try creating a clean app and then try the freeze again, > otherwise > > > > > I'll just hang on to my patch changes for a while until I get things > > > > > working with a later version. > > > > > > > > > > The thing is, when I'm attempting to run the tests directly from the > > > > > svn repo it causes problems, so I'm having issues outside the > context > > > > > of an app anway. > > > > > > > > > > Do installed gems (or any other environment configurations) have any > > > > > affect on a checked out version (from the svn repo) of edge? > > > > > > > > > > Thanks > > > > > > > > > > On 9/7/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > >> > > > > >>> Actually if I freeze my app to edge using "rake > > > > >>> rails:freeze:edge" and > > > > >>> then run script/server I get the exact same error. > > > > >>> > > > > >>> Has anybody seen anything similar? > > > > >>> > > > > >>> Here's the error again (for those that missed it)... > > > > >>> > > > > >>> > ./script/../config/../vendor/rails/activesupport/lib/ > > > > >>> active_support/dependencies.rb:248:in > > > > >>> `load_missing_constant': uninitialized constant > > > > >>> > ActionView::Helpers::JavaScriptHelper::PrototypeHelper > (NameError) > > > > >>> > > > > >>> I'm confused. > > > > >> > > > > >> This works fine for me, If you roll back your changes does it > still > > > > >> happen? Does your test app have any plugins installed? > > > > >> > > > > >> -- > > > > >> Cheers > > > > >> > > > > >> Koz > > > > >> > > > > >>> > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
