From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-01-17T03:55:39+09:00 Subject: Re: require and file extensions In article , David Alan Black wrote: >Hello -- > >On Tue, 15 Jan 2002, Phil Tomson wrote: > >> I've noticed that sometimes if I say: >> require "somefile.rb" >> >> I'll get a message about somefile.rb not being found (even thought it's >> there). If I change it to: >> require "somefile" >> >> All is well. > >> >> Also it seems like you can have the file extenstion '.rb' if you use >> single ticks, like: >> >> require 'somefile.rb' >> And all is well... >> >> So, is the formal rule (and I didn't see anything in the FAQ or books) >> that if you use double qoutes (") that it tries to append '.rb' to the >> filename and if you use single quotes (') that it won't try to append? >> (And since it appends '.rb' if you use the full filename including the .rb >> extention it actually looks for somefile.rb.rb if you specify require >> "somefile.rb" ?) > >There shouldn't be any difference between the '' and the "" syntax. >Can you provide an entire (non-)working example? So far I haven't able to reproduce this on a simple example, but I have seen this behavior on a project I'm working on which has three different subdirectories which contain files to be 'require'd. I _think_ it's happening primarily in the files in the subdirectories which are required and which in turn then require other files. I'll keep trying to make a simple example that reproduces this behavior. Phil