Problem with Borges,Apache and dRuby 
Author Message
 Problem with Borges,Apache and dRuby

I'm experimenting with Borges again and stopped at following error.

While trying use Borges in Apache through dRuby.

In got following error in apache/error.log:
/home/radek/opt/ruby-1.8.0-2003.05.20/lib/ruby/site_ruby/1.8/borges/ApacheDRbClient.rb:23:in `handle_with': undefined method `contentType' for #<Borges::Response:0x403dc840> (NoMethodError)
        from /var/www/borges/hello.rbx:5
        from /home/radek/opt/ruby-1.8.0-2003.05.20/lib/ruby/1.8/apache/ruby-run.rb:70:in `load'
        from /home/radek/opt/ruby-1.8.0-2003.05.20/lib/ruby/1.8/apache/ruby-run.rb:70:in `handler'

The ruby is the last cvs version, apache is 1.3.26-0woody3 Borges are
lates from cvs and also 0.2.0.  dRuby is version 2.0.4b1
 and 2.0.3.  The message is always the same.

So in the file ApacheDRbClient in line 23 there is
21    res = DRbObject.new(nil, server_uri).handle_request(req)
22
23    ar.content_type = res.contentType
24    ar.status = res.status
25    ar.send_http_header

The apache page is hello.rbx:
#!/usr/bin/env ruby
# $Id:$
# $Source:$
require 'borges/ApacheDRbClient'
Borges::ApacheDRbClient.handle_with('druby://127.0.0.1:7001')
#EOF

The server hello_srv.rb:
#!/usr/bin/env ruby -w
# $Id:$
# $Source:$
require 'hello.rb'
require 'borges'
require 'borges/ApacheDRbServer'

Borges::ApacheDRbServer.start('druby://127.0.0.1:7001')
Borges::ApacheDRbServer.install_INT_handler
puts "Borges DRb Server listening on #{DRb.uri}"
puts "Press Ctrl-c to quit"
DRb.thread.join
#EOF

When running server it says:
$ ruby hello_srv.rb
Borges DRb Server listening on druby://127.0.0.1:7001
Press Ctrl-c to quit

and is waiting.  Now accessign the page http://yoda/borges/hello.rbx
genereates the error message I wrote previously.

--
Radek Hnilica <Radek at Hnilica dot CZ>
=======================================
No matter how far down the wrong road you've gone, turn back.
                                                Turkish proverb

  application_pgp-signature_part
< 1K Download


Sat, 05 Nov 2005 23:06:44 GMT  
 Problem with Borges,Apache and dRuby

Ok, I wrote the quick&dirty hack.
The method contentType of class Response was not defined.  So:

--- Utilities.rb.~1.10.~        Mon May 19 23:45:48 2003

   def application_url

   end
+
+  def contentType

+  end
 end

 ##

--
Radek Hnilica <Radek at Hnilica dot CZ>
=======================================
No matter how far down the wrong road you've gone, turn back.
                                                Turkish proverb

  application_pgp-signature_part
< 1K Download


Sat, 05 Nov 2005 23:41:58 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Borges in Apache not work in my case.

2. Answer to Mod_python and Apache problems: make_obcallback(): could not import mod_python.apache

3. druby/attr_reader problem

4. Problem with druby related to TCPServer implementation on linux

5. dRuby problem with Threads

6. Borges future

7. Opinion: Linux+Apache+Java+Servlets || Linux+Apache+Python

8. cgi serving xml from Apache problem

9. eruby + Win2K + apache 2.x setup problems

10. Problems with Debian, Apache and eRuby

11. Problems with Ruby, apache, and cgi

12. Integration problems with Apache

 

 
Powered by phpBB® Forum Software