Why am i encountering 'syntax error, unexpected end-of-input' in ruby?

This error signifies a syntax mistake, often because of a missing `end` statement.

Example:


def say_hello
  puts "Hello"

Solution:


def say_hello
  puts "Hello"
end
Ensure that every block, method, class, or module has a corresponding `end`.

Beginner's Guide to Ruby