Professional Web Applications Themes

Ruby on Windows Apache Help - Ruby

Okay, I know that mod_ruby doesn't exist for Windows, and won't even compile under Cygwin. I find this unfortunate, as I need to take my web server down for maintenance, I would prefer to have a backup online while I do so, and the only boxes available to play backup run Windows. So I am willing to make do with traditional, fork/exec, slow, resource-intensive CGIs. But I would also like to have my .rhtml's run through eruby automatically. I can configure Apache to run eruby on them, but that means I need an eruby.exe for Windows. Is it still possible ...

  1. #1

    Default Ruby on Windows Apache Help

    Okay, I know that mod_ruby doesn't exist for Windows, and won't even
    compile under Cygwin. I find this unfortunate, as I need to
    take my web server down for maintenance, I would prefer to have a backup
    online while I do so, and the only boxes available to play backup
    run Windows.

    So I am willing to make do with traditional, fork/exec, slow,
    resource-intensive CGIs. But I would also like to have my .rhtml's run through
    eruby automatically. I can configure Apache to run eruby on them, but that
    means I need an eruby.exe for Windows. Is it still possible to build a
    standalone eruby executable? And will it build on Cygwin?

    Thanks.

    -Mark
    Mark Guest

  2. #2

    Default Re: Ruby on Windows Apache Help

    Mark J. Reed wrote: 
    I suppose it'll build on cygwin, I know it does on mingw so..., besides
    in the #{ruby_mirror}/ruby/binaries/cygwin/1.8/ext/ there's an
    eruby-1.0.5-i386-cygwin-1.8.tar.gz , and very fresh: 13-jan-2004.

    Adartse




    Osuka Guest

  3. #3

    Default Re: Ruby on Windows Apache Help

    Osuka Adartse <net.mx> writes: 

    Thanks! I got it working now. There's just one problem:
    eruby scripts don't honor RUBYOPT. On my Linux box I use mod_ruby's
    RubyRequire directive to automatically require cgi in every .rhtml
    file, and I thought using SetEnv to put -rcgi in RUBYOPT would
    accomplish the same thing. But while ruby.exe and irb.exe honor that
    setting, eruby.exe doesn't.

    Is there something in the way eruby is invoking the Ruby interpreter that
    prevents the options from being pd? Is there a simple tweak to the eruby
    source to enable it?

    -Mark
    Mark Guest

  4. #4

    Default Re: Ruby on Windows Apache Help

    Mark J. Reed wrote:
     
    Another big picture alternative is to build your app into a Drb server
    and keep your cgi script pretty bland -- then you can keep your app
    running in a separate process.

    --
    Chris
    http://clabs.org



    Chris Guest

  5. #5

    Default Re: Ruby on Windows Apache Help

    Chris Morris <org> writes: 

    Well, it's not really a web application, just web pages with some dynamic
    elements, done in mod_ruby+eruby - because I like Ruby. :) I have to admit
    that if I were writing an actual web app I would be more likely to use Java. I
    love Ruby the language, but ruby the implementation doesn't seem quite stable
    enough for production use, IME. Between 1.6 and 1.8 there were several
    compatibility-breaking changes, and some features are still broken in the
    latest official relese (fixed in CVS, but I'm not about to run a production app
    on bleeding-edge software).

    But I'm not familiar with Drb. What is it, some form of ruby app server?
    Does the name stand for "Distributed RuBy"?

    -Mark
    Mark Guest

  6. #6

    Default Re: Ruby on Windows Apache Help

    Mark J. Reed wrote:
     
    Yeup. http://www.rubycentral.com/articles/drb.html

    --
    Chris
    http://clabs.org



    Chris Guest

Similar Threads

  1. Replies: 7
    Last Post: January 10th, 01:23 PM
  2. Apache with Ruby: Several questions
    By Hadmut Danisch in forum Ruby
    Replies: 2
    Last Post: November 26th, 09:37 PM
  3. PostgreSQL, Ruby, FX Ruby and Windows XP
    By Szymon Drejewicz in forum Ruby
    Replies: 5
    Last Post: September 22nd, 09:14 AM
  4. Apache/FastCGI with Ruby on Windows
    By Carl Youngblood in forum Ruby
    Replies: 0
    Last Post: August 28th, 05:19 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139