On Feb 16, 2011, at 8:56 AM, Quintus <sutniuq / gmx.net> wrote:

> Am 16.02.2011 16:41, schrieb Ivan Rodriguez:
>> Hi!
>>=20
>> This should be quite easy but I can't for the life of me find a
>> solution.
>>=20
>> I have the following form:
>>=20
>> <form name=3D"input" action=3D"Main.rb" method=3D"post">
>>    Url to examine: <input type=3D"text" name=3D"url"/>
>>    <input type=3D"submit" value=3D"analyzeUrl" />
>> </form>
>>=20
>> As you see the action taken when the button is pressed involves a ruby
>> file "Main.rb".
>>=20
>> The Apache-server has no problem interpreting the file. The problem is
>> how do I pass along the text written in the textfield.
>>=20
>> I'm guessing I need to retrieve the text in Main.rb I've failed
>> miserably at that.
>>=20
>> Main.rb contains only:
>>=20
>> ARGV.each do|a|
>>  puts "#{a}";
>> end
>>=20
>> But the only time it writes out anything is when I manually send
>> Main.rb?some_parameter. Then the printout will be "some_parameter".
>>=20
>>=20
>> Summary:
>> How do I retrieve the text from the text field in Ruby?
>>=20
>>=20
>> Thanks in advance
>> ...And sorry if this already has been answered. I did searched.
>>=20
>=20
> This is the Ruby mailing list, not the Rails one. Rails may be written
> in Ruby, but they have their own forum:
> http://www.ruby-forum.com/forum/rails
>=20
> You're likely to get more answers there.

Except this isn't a rails question at all.

Ivan: you may want to look into the CGI module, which should abstract most o=
f this stuff away and make it easier to do what you're trying to do.
>=20


Ben=