From: Bharat Ruparel Date: 2010-10-17T07:31:03+09:00 Subject: require behavior change from 1.8.7 p299 to 1.9.2 p0 requiring a file is causing problems for me in Ruby 1.9.2 p0. This issue did not happen in Ruby 1.8.7 p299. Here is a ruby file hello_world.rb → cat hello_world.rb require 'sinatra' get '/' do "Hello world #{params[:name]}".strip end In Ruby 1.8.7, I get into irb and type the following: → rvm use ruby-1.8.7-p299 info: Using ruby 1.8.7 p299 bruparel:~/temp/sin_test → irb ruby-1.8.7-p299 > require 'rubygems' => true ruby-1.8.7-p299 > require 'hello_world' => true Now I switch to Ruby 1.9.2 as follows: bruparel:~/temp/sin_test → rvm use ruby-1.9.2-p0 info: Using ruby 1.9.2 p0 bruparel:~/temp/sin_test → irb ruby-1.9.2-p0 > require 'rubygems' => true ruby-1.9.2-p0 > require 'hello_world' LoadError: no such file to load -- hello_world from :29:in `require' from :29:in `require' from (irb):2 from /home/bruparel/.rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `
' However, if I issue a slightly different require command at irb prompt as shown below: ruby-1.9.2-p0 > require './hello_world' => true Then it works! But this is causing all the "old" Ruby 1.8.x programs to break. Is there an environment setting in Ruby 1.9.2 that will restore the old behavior? Bharat -- Posted via http://www.ruby-forum.com/.