[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Runy newbie question

Nick

2/6/2007 12:47:00 PM

Dear all,

I'm a newbie at ruby and I have a few simple problems. First I
installed apache and ruby on rails using the guide at
www.apacheguide.org. It appears to work fine.

Now, I have a ruby script that returns an XML file depending on the
input parameters. This script works nicely when run from the windows
command line.

However, I'm puzzled on how to launch it after a user clicks on the
"Submit" button on my website. What happens now, is that IE or FF
wants to download the .rb file.

Do you have any good online examples to share ?

Thank you,

Nick,

5 Answers

Harry

3/1/2007 1:24:00 AM

0

> Now, I have a ruby script that returns an XML file depending on the
> input parameters. This script works nicely when run from the windows
> command line.
>
> However, I'm puzzled on how to launch it after a user clicks on the
> "Submit" button on my website. What happens now, is that IE or FF
> wants to download the .rb file.
>

It works on your computer when you click the submit button but not on
your website when you click submit?

Harry

--
http://www.kakueki.com/ruby...
Japanese Ruby List Subjects in English

Tim Becker

3/1/2007 7:34:00 AM

0

The problem is that your ruby script is also a text file and apache
doesn't know if you'd just like to give back a text file or execute
the script. Per default, it does the safer option, which is just
return the text.
> This script works nicely when run from the windows
> command line.
>
> However, ... on my website, ... IE or FF
> wants to download the .rb file.

You need to configure the server to handle cgis. You can either do
this in the global Apache configuration or in a file called
`.htaccess` which alters the configuration for the directory you're
located in. You'll need to require something along the lines of:

Options +ExecCGI

to instruct the server that execution of cgi's is generally allowed, and:

AddHandler cgi-script rb

for Apache to treat .rb files as cgi's. Not sure how this is handled
on Windows, but the script also needs to be executable (chmod +x on
unix).

Sort through the Apache manual, start here:
http://httpd.apache.org/docs/1.3/howto/htacces...

Cheers,
-tim

KalElFan

5/15/2012 12:36:00 AM

0

"Hunter (Hunter)" wrote in message
news:4fb129e6.17549414@news.optonline.net...

> On Sun, 13 May 2012 21:27:08 -0400, "KalElFan"
> <kalelfan@yanospamhoo.com> wrote:
>
>> The characters all seem to have their Storybrooke memories
>> though, along with their fairy tale memories. Snow is walking
>> along the street, seeming doubtful about the memories and it
>> isn't until Charming calls her "Snow" that she seems to realize
>> everyone has had their memories restored.
>
> That is how I read it to. The whole town is likely to be like that.
> Their real memories conflicting with the lives they have lead for the
> past 28 years and what they considered "impossible", so they are
> bewildered.

Right, but I think it probably doesn't seem like 28 years to most of
them. The exceptions are probably Jefferson, Gold and Regina.
Henry should also have sensed that time was off, because he aged
and caught up with other kids like Paige. Not sure they'll ever go
there and try to explain that though.

>> So this season finale also does an end run around the huge
>> problem they would have had with ever wiping all of their
>> Storybrooke memories. They're all continuous characters at
>> this point and will presumably remain so.
>
> I don't think that was ever a problem. Only a few selected people
> knew, those who had control of Magic, Regina, Gold and Jefferson;
> and those created by magic like August.

I was mainly referring to some of the early discussions here about
the end game of the show. The "happy ending" isn't having their
Storybrooke memories erased, it's at least having the choice to
keep those memories even if they return to the fairy tale world
one day. So yes, this was a creative issue the show would have
had. It was a given the amnesia would get resolved at some point
and they'd remember the fairy tale world. But a pure reset would
have had them forget Storybrooke, and again I don't think that
would've worked for the viewership.

The "daze" of Snow and others during the transition very strongly
suggests they now have full memories of both realms. I think that's
the right creative decision for the show and it's now behind them.

Ian J. Ball

5/15/2012 1:29:00 AM

0

In article <4fb129e6.17549414@news.optonline.net>,
Hunter <buffhunter@my-deja.com> (Hunter) wrote:

> On Sun, 13 May 2012 21:27:08 -0400, "KalElFan"
> <kalelfan@yanospamhoo.com> wrote:
>
> >"KalElFan" wrote in message news:a1b3dhF34tU1@mid.individual.net...
> >
> >MAJOR SPOILERS warning in the thread title...
> >
> >> S
> >> P
> >> O
> >> I
> >> L
> >> E
> >> R
> >> S
> >>
> >> A
> >> R
> >> E
> >>
> >> B
> >> E
> >> L
> >> O
> >> W
> >
> ><snippage>
> >
> >> The tweak that keeps it going into season 2 is that no one's
> >> returned to Storybrooke...
> >
> >That should have read "no one's returned to the fairy tale
> >realm..."
> >
> >The characters all seem to have their Storybrooke memories
> >though, along with their fairy tale memories. Snow is walking
> >along the street, seeming doubtful about the memories and it
> >isn't until Charming calls her "Snow" that she seems to realize
> >everyone has had their memories restored.
> ------
> That is how I read it to. The whole town is likely to be like that.
> Their real memories conflicting with the lives they have lead for the
> past 28 years and what they considered "impossible", so they are
> bewildered.
> >
> >So this season finale also does an end run around the huge
> >problem they would have had with ever wiping all of their
> >Storybrooke memories. They're all continuous characters at
> >this point and will presumably remain so.
> ------
> I don't think that was ever a problem. Only a few selected people
> knew, those who had control of Magic, Regina, Gold and Jefferson; and
> those created by magic like August.

Blue Fairy also seemed to remember, though they were vague on that
point.

--
"We're gonna need a lot of therapy." - the character Rachel in "Bunnyman"
(named 1 of the 5 Worst Horror Films of 2011 by 28DaysLaterAnalysis.com!!)

David Johnston

5/15/2012 1:39:00 AM

0

On 5/14/2012 7:29 PM, Ian J. Ball wrote:
> In article<4fb129e6.17549414@news.optonline.net>,
> Hunter<buffhunter@my-deja.com> (Hunter) wrote:
>
>> On Sun, 13 May 2012 21:27:08 -0400, "KalElFan"
>> <kalelfan@yanospamhoo.com> wrote:
>>
>>> "KalElFan" wrote in message news:a1b3dhF34tU1@mid.individual.net...
>>>
>>> MAJOR SPOILERS warning in the thread title...
>>>
>>>> S
>>>> P
>>>> O
>>>> I
>>>> L
>>>> E
>>>> R
>>>> S
>>>>
>>>> A
>>>> R
>>>> E
>>>>
>>>> B
>>>> E
>>>> L
>>>> O
>>>> W
>>>
>>> <snippage>
>>>
>>>> The tweak that keeps it going into season 2 is that no one's
>>>> returned to Storybrooke...
>>>
>>> That should have read "no one's returned to the fairy tale
>>> realm..."
>>>
>>> The characters all seem to have their Storybrooke memories
>>> though, along with their fairy tale memories. Snow is walking
>>> along the street, seeming doubtful about the memories and it
>>> isn't until Charming calls her "Snow" that she seems to realize
>>> everyone has had their memories restored.
>> ------
>> That is how I read it to. The whole town is likely to be like that.
>> Their real memories conflicting with the lives they have lead for the
>> past 28 years and what they considered "impossible", so they are
>> bewildered.
>>>
>>> So this season finale also does an end run around the huge
>>> problem they would have had with ever wiping all of their
>>> Storybrooke memories. They're all continuous characters at
>>> this point and will presumably remain so.
>> ------
>> I don't think that was ever a problem. Only a few selected people
>> knew, those who had control of Magic, Regina, Gold and Jefferson; and
>> those created by magic like August.
>
> Blue Fairy also seemed to remember, though they were vague on that
> point.
>

Not before the reversal. Regina and Gold knew because it was their
curse. August knew because he was shielded. So the only riddle is
Jefferson, but we have no idea what he was doing when the curse hit.