From: Richard Turner Date: 2005-01-26T20:13:05+09:00 Subject: Re: mod_ruby require LoadError On Wed, 2005-01-26 at 20:05 +0900, Richard Turner wrote: > Hi, > > I'm trying to require a file in a mod_ruby script I'm running and, > although I've eliminated the SecurityError that was being thrown by > untainting the string I've added to $:, now I see a LoadError instead. > Here's a snippet of the code: > > def displaySections > $:.unshift("/home/rjt/sara/trunk/src/client/".untaint) > require 'soap/rpc/driver' > require 'page' > ... > end > > The error, from Apache's log, is: > > [Wed Jan 26 10:49:19 2005] [error] > mod_ruby: /home/rjt/sara/trunk/src/public_html/sections.rbx:33:in > `require': No such file to load -- page (LoadError) > > The script works fine from the command-line unless I set $SAFE = 3 (i.e. > it still works with $SAFE = 1 and $SAFE = 2). > > I am perplexed :( > D'oh! Apologies for replying to myself, but I've realised what the problem was. Stupidly I'd neglected to chmod 755 .../client/ :( Cheers, Richard. -- "Racing turtles, the grapefruit is winning..."