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:

========================
     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 variable or method
`testapp' for main:Object". I believe, the irb is not able to
recognize any .rb file. Can anybody help me with this?

 Additional details:-

   location of irb - D:\RoR\ruby\bin
   location of testapp.rb - D:\RoR\ruby\bin

 Many thanks in advance!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to