Brad Bennett
2008-Jan-26 18:26 UTC
"Expected #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb to define ClassMethods error
Hi, I struggled with this error: "Expected #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/ class_methods.rb to define ClassMethods for a while after upgrading from rails 1.2.3 to 2.0.2, and although I seem to have fixed it, I don''t totally understand *why* it was broken in the first place. The error occured anytime I accessed a class that had a call to acts_as_ferret, either in the console or through the server. I was able to fix the problem temporarily in the console by doing a "load" of that file (a "require" didn''t work, as expected). I seem to have fixed the problem permanently by renaming two files in the acts_as_solr (I was playing with both solr and ferret) path, class_methods.rb and instance_methods.rb. So as far as I can tell, the "require class_methods" in acts_as_ferret (and after fixing that, the "require instance_methods") was getting confused as to what file was actually being required. I have no real insight into why this started happening when I upgraded, or why my fix was in fact a fix. Clearly something with the way files are loaded was in play, but I''d be interested to know which component of my system was to blame (me, acts_as_ferret, acts_as_solr, rails, other?). Any thoughts are appreciated. Brad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
lunaclaire
2008-Jan-26 20:51 UTC
Re: "Expected #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb to define ClassMethods error
Not sure and I''m still on rails 1.2.5, but I might have a lead on tracking this down. I''ve run into similar problems a few times in the last week after deploying to my productions servers where I found the ferret index files weren''t where they should be and then I noticed in my main directory for the application there was an empty file called ''index''. Each time when I deleted this and the restarted my app, everything worked fine. Not sure why this situation arises, but that''s how I cleaned it up each time. On Jan 26, 10:26 am, Brad Bennett <bradleyjaybenn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I struggled with this error: > "Expected #{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/ > class_methods.rb to define ClassMethods > > for a while after upgrading from rails 1.2.3 to 2.0.2, and although I > seem to have fixed it, I don''t totally understand *why* it was broken > in the first place. > > The error occured anytime I accessed a class that had a call to > acts_as_ferret, either in the console or through the server. I was > able to fix the problem temporarily in the console by doing a "load" > of that file (a "require" didn''t work, as expected). > > I seem to have fixed the problem permanently by renaming two files in > the acts_as_solr (I was playing with both solr and ferret) path, > class_methods.rb and instance_methods.rb. So as far as I can tell, > the "require class_methods" in acts_as_ferret (and after fixing that, > the "require instance_methods") was getting confused as to what file > was actually being required. > > I have no real insight into why this started happening when I > upgraded, or why my fix was in fact a fix. Clearly something with the > way files are loaded was in play, but I''d be interested to know which > component of my system was to blame (me, acts_as_ferret, acts_as_solr, > rails, other?). Any thoughts are appreciated. > > Brad--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---