Hi All, I don''t know how this could happen. I got NoMethodError on running a simple Model''s find method. At first i have the same error for running find_all_by_country method where country is one of the model''s attributes. So, running a find method also doesn''t help. I have no problem running the methods on rails console. What should i check? Has anyone had a problem like this before? My app running on a frozen rails 2.3.4 on OSX 10.6.2, ruby 1.8.7 patchlevel 174. Thanks, Adinda P --~--~---------~--~----~------------~-------~--~----~ 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 chat with someone. He told me to put this line before calling find method just to check in the development log: logger.info self.class.methods.sort; return true As far as I know it has nothing to do with the problem, but it works. Is there a setting that i don''t get correctly? Thanks, Adinda On Thu, Nov 12, 2009 at 2:22 PM, Adinda Praditya <apraditya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Hi All, > > I don''t know how this could happen. I got NoMethodError on running a simple > Model''s find method. At first i have the same error for running > find_all_by_country method where country is one of the model''s attributes. > So, running a find method also doesn''t help. I have no problem running the > methods on rails console. What should i check? Has anyone had a problem like > this before? > > My app running on a frozen rails 2.3.4 on OSX 10.6.2, ruby 1.8.7 patchlevel > 174. > > Thanks, > Adinda P >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi all, Here''s the pastie http://pastie.org/694864 that describe my situation. If you see the console section, flc is a Clan record. I can ran ''find_all_by_country'' method. However, when i ran the ''users_within_country'' method, i got NoMethodError on line 2. Here are some updates. I was suggested to use searchlogic gem and i got similar error NoMethodError: undefined method `country_equals` for Clan I tried this on other ruby versions like: 1.8.7p72 (comes from Snow Leopard DVD), 1.8.6p114 on OpenSuSE and i still have the same error. I''m using frozen Rails 2.3.4. I don''t know what to do now? What should i check? Any suggestion? Thanks, Dida On Thu, Nov 12, 2009 at 2:22 PM, Adinda Praditya <apraditya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Hi All, > > I don''t know how this could happen. I got NoMethodError on running a simple > Model''s find method. At first i have the same error for running > find_all_by_country method where country is one of the model''s attributes. > So, running a find method also doesn''t help. I have no problem running the > methods on rails console. What should i check? Has anyone had a problem like > this before? > > My app running on a frozen rails 2.3.4 on OSX 10.6.2, ruby 1.8.7 patchlevel > 174. > > Thanks, > Adinda P >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 13, 3:50 am, Adinda Praditya <apradi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > Here''s the pastiehttp://pastie.org/694864that describe my situation. If > you see the console section, flc is a Clan record. I can ran > ''find_all_by_country'' method. However, when i ran the ''users_within_country'' > method, i got NoMethodError on line 2. >Looking at your snippet, it looks like users_within_country is a class method - if so you can''t call it on instances. Fred> Here are some updates. I was suggested to use searchlogic gem and i got > similar error > > NoMethodError: undefined method `country_equals` for Clan > > I tried this on other ruby versions like: 1.8.7p72 (comes from Snow Leopard > DVD), 1.8.6p114 on OpenSuSE and i still have the same error. I''m using > frozen Rails 2.3.4. I don''t know what to do now? What should i check? Any > suggestion? > > Thanks, > Dida > > On Thu, Nov 12, 2009 at 2:22 PM, Adinda Praditya <apradi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > > > > Hi All, > > > I don''t know how this could happen. I got NoMethodError on running a simple > > Model''s find method. At first i have the same error for running > > find_all_by_country method where country is one of the model''s attributes. > > So, running a find method also doesn''t help. I have no problem running the > > methods on rails console. What should i check? Has anyone had a problem like > > this before? > > > My app running on a frozen rails 2.3.4 on OSX 10.6.2, ruby 1.8.7 patchlevel > > 174. > > > Thanks, > > Adinda P