2012年05月18日 Issue of require in ruby-1.9.2 or later [長年日記]
_ Issue of require in ruby-1.9.2 or later
ruby-1.9.1 could load foo.rb from current directory by following code.
require "foo"
But ruby-1.9.2(or later) can't load foo.rb by this way for security reason. Now we must write code like following.
#! /usr/bin/ruby -I.
or
require "./foo"
or
$LOAD_PATH.push('.') require "foo"