Ruby on Rails Appears NoMethodError Error, Seek Solution

  question, ruby

I am a novice Ruby on Rails, follow the online introductory tutorial to practice, and then proceed to chapter 5.7 (the website is atHere) NoMethodError error, I later search for solutions on the Internet, still failed to solve, I practice step by step according to this tutorial.

Below are screenshots of my code and error messages.

Later I asked my friends around me, they said it was a version problem. My Ruby version is 2.2.3 and Rails version is 5.0.0. However, I hope some professional experts can help me solve this problem. Thank you very much!

Your show action is defined under private, and the view layer cannot get your variables.