Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section I3 should have you restart the rails server after you create the associations #1049

Open
kleinjoshuaa opened this issue Mar 31, 2015 · 1 comment

Comments

@kleinjoshuaa
Copy link

I was having trouble in I3 tagging. I got to the point where I'm supposed to try 'tag.articles' and I got a stack trace. The pertinent part is probably here:

NoMethodError: undefined method `articles' for #tagging::activerecord_associations_collectionproxy:0xb0d99a8

It was really strange because article.tags works just fine but tag.articles does not. I followed all the directions and I didn't see anything out of place in the models for the tag and the articles and the taggings.

The issue was that I hadn't restarted the rails server. And none of the debugging I tried to do showed any issues at all. A reload! won't fix it.

Once I restarted the server the associations worked fine and I could view the articles associated with a tag.

@nalread
Copy link

nalread commented Jun 25, 2017

Thanks for the tip; I just ran into the same problem. I'll just mention that you're supposed to restart the console too, 'reload!' won't do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants