SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mod_ruby on windows...

    I'll admit it, I couldn't compile a program if my life depended on it, so I used the windows installer on the ruby home page. I installed the mod_ruby package here, and it doesn't seem to be working.

    I copied the htaccess files directly from the the install folder, but only the fastcgi works. This is what appears in the Apache error log:
    Code:
    [Fri Oct 21 19:16:03 2005] [notice] Parent: Received restart signal -- Restarting the server.
    [Fri Oct 21 19:16:03 2005] [notice] Child 1524: Exit event signaled. Child process is ending.
    [Fri Oct 21 19:16:03 2005] [warn] (OS 995)The I/O operation has been aborted because of either a thread exit or an application request.  : winnt_accept: Asynchronous AcceptEx failed.
    [Fri Oct 21 19:16:04 2005] [notice] Child 1524: Released the start mutex
    [Fri Oct 21 19:16:05 2005] [notice] Child 1524: Waiting for 250 worker threads to exit.
    [Fri Oct 21 19:16:05 2005] [notice] Child 1524: All worker threads have exited.
    [Fri Oct 21 19:16:06 2005] [notice] Child 1524: Child process is exiting
    Here's the httpd.conf entries for it:
    Code:
    LoadModule fastcgi_module modules/mod_fastcgi.so
    LoadModule ruby_module modules/mod_ruby.so
    
    <IfModule mod_fastcgi.c>
      AddHandler fastcgi-script .fcgi
    </IfModule>
    
    <IfModule mod_ruby.c>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>
    Is there something I'm doing wrong?

    Thanks...
    Why's (Poignant) Guide to Ruby
    learn ruby with foxes, wizards, and chunky bacon

  2. #2
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't use ruby on windows, but perhaps instantrails might help.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  3. #3
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a reason you are using mod_ruby? Its not the recommended way of doing things.

  4. #4
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's the only way I've seen it done. How else would you connect ruby and apache?
    Why's (Poignant) Guide to Ruby
    learn ruby with foxes, wizards, and chunky bacon

  5. #5
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    apache/mod_fastcgi
    gem install fcgi

  6. #6
    SitePoint Addict Brak's Avatar
    Join Date
    Jul 2004
    Location
    Central Coast, CA
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yep. Don't bother with mod_ruby, it's not useful (especially for development since you can only have one app at a time!)

    Try SCGI or FastCGI.
    Studio Rockstar's Blog - A journey to quitting the dayjob.

  7. #7
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only reason you might want to use mod_ruby is if you want to de ruby cgi programs with eruby templates without using rails. If you just want to write scripts that apache can serve that are just pure ruby without the rails framework then mod_ruby is actually pretty nice. If you do go this route the make sure to install mod_eruby as well for a nice ruby tamplating language that lets you write pages in ruby just like you would in php. Like so:

    <%= ruby code here %>
    <p> html text here </p>
    <% block
    of ruby
    code
    here %>
    <div> more html code here</div>

  8. #8
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    296
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ezmobius1
    apache/mod_fastcgi
    gem install fcgi
    hrmmm...
    (sorry for the pink)
    Why's (Poignant) Guide to Ruby
    learn ruby with foxes, wizards, and chunky bacon

  9. #9
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahhh thats right, you're on windows. fcgi is a native package in C that must be compiled. This will help you then:

    http://rubyforge.org/projects/rubyforapache/

    A self-contained installer that includes mod_fastcgi and mod_ruby for Apache 2.0 and corresponding Ruby extensions for Windows platform.

  10. #10
    Resident Java Hater
    Join Date
    Jul 2004
    Location
    Gerodieville Central, UK
    Posts
    446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If this is a development machine, just stick to webrick, and use FCGI / Lighttpd on linux/unix for a production box


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •