On Friday, February 14, 2014 9:12:38 AM UTC+11, Colin Law wrote: > > On 13 February 2014 06:57, Nadia Vu <winte...@gmail.com <javascript:>> > wrote: > > Hi there, I'm very new to RoR please be kind. > > > > I wasn't sure where to go but I was hoping I could find help here after > days > > of hair pulling. Stackoverflow was not successful. > > > > I have followed the Official Beginners Guide to ROR and made a blog. > > > > I wanted to take it further and add a tagging system to the blog. Im > getting > > errors and I don't have enough knowledge of ruby to determine what is > > causing them. Any thoughts/help would be really appreciated. > > > > So this is the error > > > > ActiveRecord::StatementInvalid in Posts#show > > > > Showing /home/nadia/blog/app/views/posts/show.html.erb where line #8 > raised: > > > > SQLite3::SQLException: no such column: taggings.post_id: SELECT "tags".* > > It says there is no column post_id in the table taggings. Is it that > you do not think > it should be looking for that column or is it that you know there > should be but think that > it does exist? > > You have neglected to show us taggings.rb but I presume it contains > belongs_to post. > > Colin >
Oh yes sorry This is my Taggings.rb 1 class Tagging < ActiveRecord::Base 2 belongs_to :tag 3 belongs_to :posts 4 end -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fc21d5db-8796-44b6-b4ac-c7ade34fb625%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.