I created a file say `mylibrary.rb`. content of which is

puts "I was loaded!"

class MyLibrary
end

Now I tried to load it in my IRB and got the below error.

C:\>irb --simple-prompt

>> require 'mylibrary'
LoadError: cannot load such file -- mylibrary
        from 
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
        from 
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
        from (irb):1
        from C:/Ruby193/bin/irb:12:in `<main>'

>> autoload :MyLibrary, 'mylibrary'
=> nil

>> MyLibrary.new
LoadError: cannot load such file -- mylibrary
        from (irb):4
        from C:/Ruby193/bin/irb:12:in `<main>'
>>

-- 
Posted via http://www.ruby-forum.com/.