Sorry if this is posted twice, but this didn''t seem to get through when I first tried 6 hours ago. I''ll try once more. ----- Hello, I''ve read the file on running tests for actionpack (I''m working on a patch), but I''m getting this error... ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:240:in `load_missing_constant'': uninitialized constant ActionView::Helpers::JavaScriptHelper::PrototypeHelper (NameError) I''ve tried... rake test_action_pack rake test and ruby test/templates/date_helper_test.rb (the file that my tests need to go in) How do I resolve this missing constant problem? Thanks, Andrew --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Hello, Can anybody help me with the problem outlined below? I posted last week and still haven''t received a response. I''d think at least a core dev would have some insight on this issue. I''ve tried asking in the IRC channel as well, but haven''t received a response there either. I''d really like to submit this patch of mine, but without being able to run the tests, I''m not really eager to submit it. I''ll try IRC again if I still get nothing from the list. Thanks, Andrew> Hello, > > I''ve read the file on running tests for actionpack (I''m working on a > patch), but I''m getting this error... > > ./test/controller/../../lib/../../activesupport/lib/active_support/dependencies.rb:240:in > `load_missing_constant'': uninitialized constant > ActionView::Helpers::JavaScriptHelper::PrototypeHelper (NameError) > > I''ve tried... > rake test_action_pack > rake test > and > ruby test/templates/date_helper_test.rb (the file that my tests need to > go in) > > How do I resolve this missing constant problem? > > Thanks, > Andrew > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
On 9/7/06, Andrew Kaspick <akaspick@gmail.com> wrote:> > Can anybody help me with the problem outlined below? I posted last > week and still haven''t received a response. I''d think at least a core > dev would have some insight on this issue.I haven''t seen this error. If a test failure is not relevant to your patch, just submit it as-is. jeremy --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
All I''ve done is check rails edge out, make my modifications and am attempting to run the tests from the actionpack directory, but get the error I''ve mentioned. So I''m not sure how to run my tests at all to make sure things are working as they should. In the directory "rails/actionpack" is where I''m trying to run one of the following commands... rake test_action_pack rake test ruby test/templates/date_helper_test.rb All produce the error. I suppose I could try to find the code that this dependency is coming from and comment it out for the time being to get my tests to run... if possible. Andrew On 9/7/06, Jeremy Kemper <jeremy@bitsweat.net> wrote:> On 9/7/06, Andrew Kaspick <akaspick@gmail.com> wrote: > > > Can anybody help me with the problem outlined below? I posted last > > week and still haven''t received a response. I''d think at least a core > > dev would have some insight on this issue. > > > I haven''t seen this error. If a test failure is not relevant to your patch, > just submit it as-is. > > jeremy > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
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. On 9/7/06, Andrew Kaspick <akaspick@gmail.com> wrote:> All I''ve done is check rails edge out, make my modifications and am > attempting to run the tests from the actionpack directory, but get the > error I''ve mentioned. So I''m not sure how to run my tests at all to > make sure things are working as they should. > > In the directory "rails/actionpack" is where I''m trying to run one of > the following commands... > > rake test_action_pack > rake test > ruby test/templates/date_helper_test.rb > > All produce the error. > > I suppose I could try to find the code that this dependency is coming > from and comment it out for the time being to get my tests to run... > if possible. > > Andrew > > On 9/7/06, Jeremy Kemper <jeremy@bitsweat.net> wrote: > > On 9/7/06, Andrew Kaspick <akaspick@gmail.com> wrote: > > > > > Can anybody help me with the problem outlined below? I posted last > > > week and still haven''t received a response. I''d think at least a core > > > dev would have some insight on this issue. > > > > > > I haven''t seen this error. If a test failure is not relevant to your patch, > > just submit it as-is. > > > > jeremy > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
> 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
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 <michael@koziarski.com> 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
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 <michael@koziarski.com> 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
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 <solo@gatelys.com> 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 <michael@koziarski.com> 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
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<http://dev.rubyonrails.org/ticket/6132>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 <akaspick@gmail.com> 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 <solo@gatelys.com> 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 <michael@koziarski.com> 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
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 <http://dev.rubyonrails.org/ticket/6178>. On 9/12/06, choonkeat <choonkeat@gmail.com> 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<http://dev.rubyonrails.org/ticket/6132>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 <akaspick@gmail.com> 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 < solo@gatelys.com> 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 <michael@koziarski.com> 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Nice work. Thanks for looking into this. Now I know I''m not crazy. On 9/12/06, choonkeat <choonkeat@gmail.com> 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 <choonkeat@gmail.com> 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 <akaspick@gmail.com> 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 < solo@gatelys.com> 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 <michael@koziarski.com> 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Makes sense -- we''ve run into issues before where load order varied between platforms and caused inconsistent behavior. I wonder if we should monkeypatch Dir.foreach to be sorted and fix this at a higher level? There are probably other places in the framework where inconsistent load order could (does?) induce weirdness. Off the top of my head, I can''t think of any bad side effects of forcing consistent ordering across the board for Dir.foreach... Thoughts? On Sep 12, 2006, at 2:24 AM, choonkeat 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 . > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Solomon White wrote:> Makes sense -- we''ve run into issues before where load order varied > between platforms and caused inconsistent behavior. I wonder if we > should monkeypatch Dir.foreach to be sorted and fix this at a higher > level? There are probably other places in the framework where > inconsistent load order could (does?) induce weirdness. Off the top of > my head, I can''t think of any bad side effects of forcing consistent > ordering across the board for Dir.foreach... Thoughts? >I think that if there is a program somewhere that relied on Dir.foreach having a particular order, it would break anyway if moved across platforms, so breaking it by doing this will just make it break faster. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
Why not wrap Dir.foreach in a custom method or something and do the ordering in that? ie. get all the files, sort the array, return it. On 9/13/06, Nex3 <nex342@gmail.com> wrote:> > Solomon White wrote: > > Makes sense -- we''ve run into issues before where load order varied > > between platforms and caused inconsistent behavior. I wonder if we > > should monkeypatch Dir.foreach to be sorted and fix this at a higher > > level? There are probably other places in the framework where > > inconsistent load order could (does?) induce weirdness. Off the top of > > my head, I can''t think of any bad side effects of forcing consistent > > ordering across the board for Dir.foreach... Thoughts? > > > > I think that if there is a program somewhere that relied on Dir.foreach > having a particular order, it would break anyway if moved across > platforms, so breaking it by doing this will just make it break faster. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
That would be fine, but we''d also need to go through the Rails framework and replace all the foreach calls with our new custom method. And train people to use it in the future instead of the stock foreach. On Sep 13, 2006, at 3:36 PM, Andrew Kaspick wrote:> > Why not wrap Dir.foreach in a custom method or something and do the > ordering in that? ie. get all the files, sort the array, return it. > > On 9/13/06, Nex3 <nex342@gmail.com> wrote: >> >> Solomon White wrote: >>> Makes sense -- we''ve run into issues before where load order varied >>> between platforms and caused inconsistent behavior. I wonder if we >>> should monkeypatch Dir.foreach to be sorted and fix this at a higher >>> level? There are probably other places in the framework where >>> inconsistent load order could (does?) induce weirdness. Off the >>> top of >>> my head, I can''t think of any bad side effects of forcing consistent >>> ordering across the board for Dir.foreach... Thoughts? >>> >> >> I think that if there is a program somewhere that relied on >> Dir.foreach >> having a particular order, it would break anyway if moved across >> platforms, so breaking it by doing this will just make it break >> faster. >> >>> >> > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---