I am new to Ruby. My sample code gives me this exception:
C:/Users/abc/RubymineProjects/Sample/hello.rb:5:in `<class:Hello>': undefined method `first_method' for Hello:Class (NoMethodError) from C:/Users/abc/RubymineProjects/Sample/hello.rb:1:in `<top (required)>' from -e:1:in `load' from -e:1:in `<main>'
Process terminated with exit code 1
My code is:
class Hello def first_method puts "Hello World" end first_method() end
I am using RubyMine 4.5.4.
source share