Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > rublog and mod_ruby (was: mod_ruby & Apache)

Reply
Thread Tools

rublog and mod_ruby (was: mod_ruby & Apache)

 
 
Robert McKinnon
Guest
Posts: n/a
 
      03-06-2004
I have a similar difficulty trying to run rublog with mod_ruby on
Apache.

Apache is not using the Content-type field from the rublog output,
instead it adds its own with type text/plain. So the web browser thinks
it is receiving plain text. I used a proxy server to see the HTTP
Response, it looks like:
HTTP/1.1 200 OK
Date: Sat, 06 Mar 2004 05:56:14 GMT
Server: Apache/2.0.48 (Fedora)
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain; charset=UTF-8

1c3b

Content-type: text/html
Last-modified: Thu, 01 Jan 1970 00:00:00 GMT

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
...


My setup:
ruby 1.8.1 (2004-02-2
httpd 2.0.48-1.2
mod_ruby 1.1.2
rublog lastest CVS version[1]


My httpd.conf:
<IfModule mod_ruby.c>
RubyRequire apache/ruby-run

<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
RubyAddPath /home/aaa/apps/rublog/rublog
Options ExecCGI
</Files>
</IfModule>

Alias /blog "/home/aaa/docs/blog/cgi/rublog.rbx"


For now I'll go back to running rublog as a cgi script.

Regards,
Rob

[1] To prevent a security error when running rublog I had to change
line 168 of FileEntries.rb from:
Dir.glob(File.join(entry_dir.full_name, "*")).each do |filename|
to:
file_pattern = File.join(entry_dir.full_name, "*")
file_pattern.untaint
Dir.glob(file_pattern).each do |filename|


--- "Dr. Ephemeron" <(E-Mail Removed)> wrote:
> Sorry, if this seems like a simple problem, but I have:
>
> Mandrake 9.2
> Apache 2.0.47
> mod_ruby 1.0.7
> eruby 1.0.5
>
> mod_ruby is reported installed by Apache and I can make a test
> *.rhtml file
> in my html directory and it works fine.
>
> When put a *.rbx file in my cgi-bin directory and browse it with
> Mozilla
> 1.4, it prints, but it prints everything in the file like this:
>
> HTTP/1.1 200 OK
> Content-type: text/html
>
> <!DOCTYPE HTML PUBLIC ...
> <html>
> <head>
> .
> .
> .
>
> It looks to me like it is probably an Apache setting that needs to be
> changed, but I can't figure out which one. I am new to all of this
> and
> struggling just to get it operational so I can learn more.
>
> Thanks


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


 
Reply With Quote
 
 
 
 
Dave Thomas
Guest
Posts: n/a
 
      03-06-2004

On Mar 6, 2004, at 0:16, Robert McKinnon wrote:

> Apache is not using the Content-type field from the rublog output,
> instead it adds its own with type text/plain. So the web browser thinks
> it is receiving plain text. I used a proxy server to see the HTTP


If you come up with a solution for this, please send me a patch and
I'll integrate it in.


Cheers

Dave



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Rublog Bill Atkins Ruby 2 08-09-2004 02:44 PM
Inlining Images Using Rublog Lipper, Matthew Ruby 1 07-27-2004 05:46 PM
RubLog has moved Dave Thomas Ruby 0 04-18-2004 07:21 PM
Rublog questions Hal Fulton Ruby 5 01-04-2004 03:11 PM
Rublog Problems Brian McCallister Ruby 3 11-01-2003 02:21 AM



Advertisments