Most simple Ruby Problem Imaginable

Hi,

I’m new to Ruby and am learning with “Beginning Ruby from Novice to
Professional,” and I’ve hit a roadblock within the first few pages of
the book.

For some reason, even though I believe I am following the instructions
correctly, I keep having the same problem. I am using the author’s
first example:

class Person
attr_accessor :name, :age, :gender
end
=>nil
person_instance=person.new

Every time I attempt to create an instance of the class I receive the
“name error: undefined local variable…” error message. After
uninstalling and reinstalling various versions of Ruby I am having the
same problem. What’s going on here?

Thanks,
Jon

person_instance=person.new

person_instance=Person.new

            ^ !

Thank you so much. I had a feeling that case sensitivity was going to
bite me at some point. Sorry for your time.
Thanks again,
Jon

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs