Hi all, I''ve got stuck with this. Here''s the error message: NoMethodError in Account#index Showing account/index.rhtml where line #4 raised: undefined method `table_name'' for Upload:Class Extracted source (around line #4): 1: <h1>My account</h1> 2: 3: Login name: <%= current_user.login %> <br /> 4: Files uploaded: <%= current_user.uploads.find(:all).count %> 5: <br /> 6: <%= render :partial => ''layouts/menu'' %> its a basic acts_as_authenticated user model with has_many :uploads attribute any suggestions on how to fix this? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
A backtrace would be really awesome, along with the files from the app that it points to. razy wrote:> Hi all, > > I''ve got stuck with this. Here''s the error message: > NoMethodError in Account#index > > Showing account/index.rhtml where line #4 raised: > > undefined method `table_name'' for Upload:Class > Extracted source (around line #4): > > 1: <h1>My account</h1> > 2: > 3: Login name: <%= current_user.login %> <br /> > 4: Files uploaded: <%= current_user.uploads.find(:all).count %> > 5: <br /> > 6: <%= render :partial => ''layouts/menu'' %> > > its a basic acts_as_authenticated user model with has_many :uploads > attribute > any suggestions on how to fix this? > > > >--~--~---------~--~----~------------~-------~--~----~ 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 got that error too (but in Rails 1.2.3) http://pastie.org/139900 I only added line7 in user_controller to have logs. The app works perfectly without it. And I also tried dropping/migrating the DB. --~--~---------~--~----~------------~-------~--~----~ 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 Jan 16, 2008, at 10:23 PM, riskyhm wrote:> > I got that error too (but in Rails 1.2.3) > > http://pastie.org/139900 > > I only added line7 in user_controller to have logs. The app works > perfectly without it. And I also tried dropping/migrating the DB.Look at the message. You have a naming conflict between WEBrick::Log and the Log class you defined. Can you use WoodenLogs or something like that? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---