CGI Scripts

jwillia

New Member
Messages
7
Reaction score
0
Points
0
Hi All,
I am just starting out in web development, and have a question (one of many).
Should the following cgi script work if I save it as test.cgi in the cgi-bin directory and access it with:

http://mysite.pcriot.com/chi-bin/test.cgi


#!/usr/bin/ruby
print "HTTP/1.0 200 OK\r\n"
print "Content-type: text/html\n\n"
print "<html><body>Hello World!</body></html>\r\n"

Thanks in advance
 

jwillia

New Member
Messages
7
Reaction score
0
Points
0
Yes it should be the CGI-BIN directory. What do I need to make this test script work?

#!/usr/bin/ruby
print "HTTP/1.0 200 OK\r\n"
print "Content-type: text/html\n\n"
print "<html><body>Hello World!</body></html>\r\n"
 

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
chmod to 755
as long as thats the path to ruby, that should work - what error are you getting?
 

Sohail

Active Member
Messages
3,055
Reaction score
0
Points
36
Yeah changing the permissions should fix that problem...
 

jwillia

New Member
Messages
7
Reaction score
0
Points
0
I did a trouble ticket through the new chat service (great service), to ask if there was any support for Ruby, and learned that Ruby is not yet supported on x10. It is still being discussed. So along with setting the permissions, this was the main reason my code would not run.

Thanks for the assist everyone.
--Jay
 
Top