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

nomethoderror undefined method `name' for nil:nilclass due to ActiveRecord bug #1170

Open
jeanmerlet opened this issue Jan 24, 2016 · 0 comments

Comments

@jeanmerlet
Copy link

This may be restricted to Fedora users, but the combination of Ruby 2.2 and Rails 4.0.0 raised the "nomethoderror undefined method `name' for nil:nilclass" in this tutorial for me when adding "@articles.comments.size" to the h3 comment header in the comments section of the Blogger tutorial. As explained here, this is due to an ActiveRecord bug that is fixed with earlier Ruby versions or later Rails versions. I managed to fix the problem by upgrading to Rails 4.1.2. Obviously changing the suggested Rails version just because of this is probably not the best solution, but maybe a side note should be inserted? The SO solution is here, which was opened by me.

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

1 participant