[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

mod_ruby require LoadError

Richard Turner

1/26/2005 11:05:00 AM

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 :(

Cheers,

Richard.
--
"Racing turtles, the grapefruit is winning..."



2 Answers

Richard Turner

1/26/2005 11:13:00 AM

0

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..."



liberal

8/3/2012 4:58:00 PM

0

On Thursday, August 2, 2012 8:54:13 PM UTC-4, BeamMeUpScotty wrote:
> On 8/2/2012 8:45 PM, Yoorghis@Jurgis.net wrote:
>
> > On Thu, 02 Aug 2012 19:49:58 -0400, Mr.B1ack <bw@barrk.net> wrote:
>
> >
>
> >>> The answer is, it can't be done. Even if Obama taxed those making
>
> >>> $200,000 and more at a tax rate of 100%, he would not be able to "pay
>
> >>> down our debt". [2]
>
> >>
>
> >> You could tax that one percent a LOT more and it STILL
>
> >> wouldn't generate a lot of cash ... certainly not enough
>
> >> to pay down the national debt.
>
> >
>
> > But you could alter the tax code and tax scads of income different in
>
> > the future.
>
>
>
> Your tax will kill any real growth and so the income tax is an exercise
>
> in futility since no one will really have any income.

Under FDR's 91% rate, US economic growth was immense for two decades. Under Bush 1/2's 35% rate, we had an economic collapse rivaling the Great Depression.

Logic and history show you to be wrong.