NameError: undefined local variable or method `testapp' for main:Object

Hi,

   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:

You are mixing things up a bit. ruby testapp.rb is what you'd enter at
the command prompt to run a ruby script. irb on the other hand is a
ruby console, that evaluates ruby code.

Fred

Hi Fred,

   Thanks for clarification. You're right, I had mixed up things
there.

Thanks,
Maddy

ruby class names are Upper case by definition, use:

class Sampleclass
  or
class SampleClass