I''m running a new instillation of rails on osx
With some minor headaches and some bizarre puzzles still unsolved like
the "Stack level too deep" error when I run a ruby scrip within the
rails environment, but works fine on the command line...
Anyway, now I get a NoMethodError every time I open a page using a
different conroller. When I shut the server (mongrel) down and reboot,
the page giving me a NoMethodError works perfectly until I link to a
page using another controller. There is no problem with the code as it
runs perfectly with a mongrel reboot, and I can load the page over and
over again with different parameters and get the results I expect.
What''s corrupting mongrel instantaneously whenever I use a different
controller?
Generally the NoMethodError comes from a call to something like this
@globalvariable = ClassName.find(params[:id])
@globalvariable.relatedtableviaid.each do |d|
I get a NoMethodError with an undefined method for the related table
until I reboot mongrel.
All my models are set up correctly with belongs_to and has_many etc.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---