ZippySwish wrote:
> I put "script.rb" into the cgi-bin folder of my webhost, but nothing's
> happening.

I very much doubt "nothing" is happening. But perhaps you don't see 
anything in your browser.

A better way to test from the client machine is to use telnet instead of 
a web browser. Type the following:

telnet www.yourhost.com 80
GET /cgi-bin/script.rb HTTP/1.0
Host: www.yourhost.com
<blank line>

and see what response comes back. Paste it here if it doesn't make 
sense.

> script.rb containing for example:
> 
> #!/usr/bin/ruby
> puts "<html><body><p>Hello World!</p></body></html>"

Often you will need

puts "Content-Type: text/html"
puts
puts "... rest of output ..."

That may or may not be the problem. You'll need to be more specific 
about what you see.

You may also need to set the execute bit on script.rb (chmod +x 
script.rb - but if you're on a hosted service you may be able to do this 
over FTP/SFTP with a 'site chmod' command. Consult your service 
provider)
-- 
Posted via http://www.ruby-forum.com/.