Ruby doesnt work right

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
flare
-


Joined: 21 Sep 2003
Posts: 11

PostPosted: Thu Feb 26, 2004 4:16 am    Post subject: Ruby doesnt work right Reply with quote

I followed the instructions to install perl, and just changed the extension to .rb and it still doesnt wanna work
[url]v-com.sytes.net/hello.rb[/url]
an error 500
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Feb 26, 2004 4:52 am    Post subject: Reply with quote

Perl Files are extensions with only basicly
.pl and .cgi , I have never seen an exten..
like that before as a perl file , looks weird.
Back to top View user's profile Send private message Visit poster's website
flare
-


Joined: 21 Sep 2003
Posts: 11

PostPosted: Thu Feb 26, 2004 6:02 am    Post subject: Reply with quote

no no no, Ruby is a different scripting language all together...., but I used the perl install instructions, because when I searched ruby here in the forums, I found a post and it said use the perl install instructions, an just change the extensions.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Feb 26, 2004 10:01 am    Post subject: Reply with quote

Ok , you wasn't to specific , I see now lol !
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Feb 27, 2004 9:21 pm    Post subject: Re: Ruby doesnt work right Reply with quote

flare,

Installing Ruby is very simple (see http://www.aprelium.com/forum/viewtopic.php?t=618).

It seems that you're getting error 500 because of your script? Are you sending the right CGI headers (with print "Content-type: text/html^/" for example)?

Can you post your script here so that we can review it?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
flare
-


Joined: 21 Sep 2003
Posts: 11

PostPosted: Sat Feb 28, 2004 1:18 am    Post subject: Reply with quote

class Hello
attr_reader :msg
def initialize
@msg = "Hello, World"
end
end

h = Hello.new
puts h.msg
print "Press RETURN"
$stdin.gets

its an example that came with Ruby... so im not sure what is actually supposed to look like.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Feb 29, 2004 3:43 pm    Post subject: Reply with quote

flare,

The example you used was not meant to be a CGI script. It is an interactive program that doesn't conform to the CGI standard.

A CGI script must send at least a header line, a blank line, and the body (that will be displayed in the client browser). Search for Ruby on this forum and you'll find a sample script.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group