From: Luis Lavena Date: 2010-12-20T04:05:21+09:00 Subject: Re: Ruby 1.9.2 require issue On Dec 19, 3:17 pm, Justin Whalley wrote: > Hi, I'm new to Ruby. I am trying to use require to bring in methods.rb, > which is located on my hard drive in the Chapter05 folder. Getting the > following error: > > C:\Users\Whalley\Training\Ruby\Practice\Chapter05>ruby methods.rb > > C:\Users\Whalley\Training\Ruby\Practice\Chapter05>irb > irb(main):001:0> require "methods.rb" > LoadError: no such file to load -- methods.rb >         from :29:in `require' >         from :29:in `require' >         from (irb):1 >         from C:/Ruby192/bin/irb:12:in `
' > irb(main):002:0> > > Anyone know what I can do to resolve this? I am following along with a > video tutorial that is using 1.8.?, and they are getting it returned as > "true" without any Load Errors. > > Any and all help will be much appreciated. http://www.ruby-lang.org/en/news/2010/08/18/ruby-1-9.2-released/ FAQ Section: "It causes a LoadError $: doesn't include the current directory. Some script may need modifications to work properly." The current directory is no longer included in the $LOAD_PATH ($:) You need to include it to have the compatibility behavior of 1.8.x irb -I. or ruby -I. script.rb -- Luis Lavena