What's causing the 'nomethoderror' in my ruby code?

This error typically occurs when you're attempting to call a method that doesn't exist for a given object.

Example:


str = "Hello"
puts str.upcse

Solution:


str = "Hello"
puts str.upcase
Ensure the method you're trying to call exists for the object and that there aren't any typos.

Beginner's Guide to Ruby