[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Apache Request Object Method Undefined?

ironsoup

12/8/2004 4:52:00 PM

Hello all. I'm fairly new to Ruby/mod_ruby and while running a few
tests I have run into this error:

------------------------------------------------------------------------------
/home/http2/public_html/randomimg.rhtml:7: undefined method
`document_root' for #<Apache::Request:0x403f9cb8> (NoMethodError)
from (eval):53
from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:116:in
`eval_string_wrap'
from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:116:in `run'
from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:72:in `handler'
------------------------------------------------------------------------------

Isn't document_root a valid method for the Apache request object?
Greatly appreciate any feedback. Thanks!

3 Answers

Kent Sibilev

12/8/2004 7:47:00 PM

0

document_root is the method of Apache::Server.
Try request.server.document_root

Cheers,
Kent.

On Dec 8, 2004, at 11:52 AM, ironsoup wrote:

> Hello all. I'm fairly new to Ruby/mod_ruby and while running a few
> tests I have run into this error:
>
> -----------------------------------------------------------------------
> -------
> /home/http2/public_html/randomimg.rhtml:7: undefined method
> `document_root' for #<Apache::Request:0x403f9cb8> (NoMethodError)
> from (eval):53
> from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:116:in
> `eval_string_wrap'
> from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:116:in `run'
> from /usr/local/lib/ruby/1.8/apache/eruby-run.rb:72:in `handler'
> -----------------------------------------------------------------------
> -------
>
> Isn't document_root a valid method for the Apache request object?
> Greatly appreciate any feedback. Thanks!
>
>



ironsoup

12/9/2004 2:19:00 PM

0

Yup, that fixed it. Thanks a lot!

jonathan23

4/7/2011 2:42:00 PM

0

On Apr 7, 9:24 am, Bertil <stigfjor...@hotmail.com> wrote:
> On Apr 5, 11:45 am, Bertil <stigfjor...@hotmail.com> wrote:
>
> > Consider the hand :xx-KJYx-KJ98-AKx.
> > Would you open this hand as dealer 1NTstr?
> > Suppose prd transfers to S.
> > Or worse yet, suppose LHO doubles for penalty and prd passes,
> > then what would you do?
>
> > Bertil
>
> Rather than trying to escape from a double of a specific 4-4-3-2 hand,
> let's consider the problem in general.
>
> There are 6 combinations of 4-4, viz. S-H,S-D,S-C, H-D, H-C, D-C.
> Thus 2 combos have the same color, S-C and H-D.
>
> One could agree to bid 2C for the black combo or 2D for the red combo
> and
> let responder chose the best.
>
> Alternatively one could focus on 4-4 in the majors or the minors and
> agree to
> bid 2C for the minors and 2D for the majors, a reversed Becker
> convention.
>
> But this would rule out bidding a 5-card suit. Thus an S-O-S redouble
> could
> be used to ask responder to apply one of the two 4-4 bids.
>
> This approach would help to escape from a doubled NT in two out six
> cases
> when holding a 4-4-3-2 pattern, which must be better than just
> passing.
>

The double does not change the fact that it is responder and not
opener who knows what the partnership's approximate assets are.
Responder may pass 1NTX with some scattered values but not enough to
be sure of game feeling that's as good a place as any to be. It may
make, make with overtricks, or only be down one, which could just as
easily be the fate of a runout at a higher level. A runout could even
be worse in a number of ways. It makes sense that responder should
probably be the one who gets any big red (escape) button to press
because he's likelier to know when it's needed.

--
- Jon Campbell
Ottawa Canada