search for: sample_class

Displaying 1 result from an estimated 1 matches for "sample_class".

2009 Aug 31
3
NameError: undefined local variable or method `testapp' for main:Object
...I am new to Ruby on Rails. Recently, I downloaded and installed the InstantRails in the D:\ drive of my system. Now I wanted to try some small examples in ''irb'', so I created a file "testapp.rb" and in that pasted a code like this: ======================== class sample_class def sample_method puts "sample program" end end myclass = sample_class.new myclass.sample_method ======================== Now when I give command (To run the application) "ruby testapp.rb" , I get this error "NameError: undefined local varia...