Open luzmdiaz2013 opened 6 years ago
You have a typo in one of your models.
class AuthorArticle < ApplicationRecord
t.belongs_to :author
t.belongs_to :article
end
It should just be:
class AuthorArticle < ApplicationRecord
belongs_to :author
belongs_to :article
end
Error message: not sure what it means rails aborted! NameError: undefined local variable or method'
/Users/student_16/wdi/Projects/Alchemy/app/models/author_article.rb:1:in '
Tasks: TOP => db:seed
t' for #<Class:0x007fb07d82b7b8> /Users/student_16/wdi/Projects/Alchemy/app/models/author_article.rb:2:in
<top (required)>' /Users/student_16/wdi/Projects/Alchemy/db/seeds.rb:18:in
<top (required)>' /Users/student_16/wdi/Projects/Alchemy/bin/rails:9:inrequire' /Users/student_16/wdi/Projects/Alchemy/bin/rails:9:in
<top (required)>' /Users/student_16/wdi/Projects/Alchemy/bin/spring:15:in<top (required)>' bin/rails:3:in
load' bin/rails:3:in `3 - solutions rails c could not identify the tables tried to add to the db manually psql - author, article tables exist but are empty. edited the seed file and added the ArticleAuthor join table data