mod_ruby(.rbx) newbie

R

Ruby Tuesday

Hi, I was wondering why my .rbx script just print the out out of my ruby
scripts ignoring the html tags?

Thanks
 
D

David Heinemeier Hansson

Hi, I was wondering why my .rbx script just print the out out of my
ruby scripts ignoring the html tags?

Did you setup your httpd.conf file accordingly and restart the web
server?

Sample config for rbx recognition:

LoadModule ruby_module libexec/httpd/mod_ruby.so
AddModule mod_ruby.c

<IfModule mod_ruby.c>
RubyRequire apache/ruby-run
RubyRequire auto-reload
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>
 
R

Ruby Tuesday

I did exactly what you suggest and still spitting out the result of my
cgi scripts.

The output of my helloworld.rbx scripts are as follows:

HTTP/1.1 200 OK
Content-Type: text/html

<html>
<head>
<title>Hello World</title>
</head>
<body>

<br>
<h1>Hello World!</h1>
<br>

<hr>
<p>
<strong>HelloWorld on mod_ruby</strong><br>
Gateway interface: CGI-Ruby/1.1
</p>

</body>
</html>
 
T

Trey Campbell

Eliminate the line that prints the HTTP status (you can leave the
content-type) and you should be in business.

Cheers,
Trey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top