Can't get Apache2 to i interpret my ruby file

Discussion in 'Ruby' started by laredotornado@zipmail.com, Feb 1, 2007.

  1. Guest

    Hi,

    I have Apache 2.2 installed on my Fedora Core 5 Linux machine. I
    created this file, "test.rb" at my public document root

    #!/usr/local/bin/ruby
    print "Content-type: text/html\r\n\r\n"
    print "<html><body>Hello everybody!!!!</body></html>\r\n"

    and when i visit http://mydomain.com/test.rb, the output is

    #!/usr/local/bin/ruby
    print "Content-type: text/html\r\n\r\n"
    print "<html><body>Hello SAm and Lisa!!!!</body></html>\r\n"

    That's right, it's just the same file. So my question is, what
    directives to I need to add to my "httpd.conf" file to make this file
    interpret? I am surprised by how little documentation there is on how
    to do this.

    Thanks, - Dave
    , Feb 1, 2007
    #1
    1. Advertising

  2. Alin Popa Guest

    wrote:
    > Hi,
    >
    > I have Apache 2.2 installed on my Fedora Core 5 Linux machine. I
    > created this file, "test.rb" at my public document root
    >
    > #!/usr/local/bin/ruby
    > print "Content-type: text/html\r\n\r\n"
    > print "<html><body>Hello everybody!!!!</body></html>\r\n"
    >
    > and when i visit http://mydomain.com/test.rb, the output is
    >
    > #!/usr/local/bin/ruby
    > print "Content-type: text/html\r\n\r\n"
    > print "<html><body>Hello SAm and Lisa!!!!</body></html>\r\n"
    >
    > That's right, it's just the same file. So my question is, what
    > directives to I need to add to my "httpd.conf" file to make this file
    > interpret? I am surprised by how little documentation there is on how
    > to do this.
    >
    > Thanks, - Dave


    Hi Dave,

    Please take a look at: http://wiki.modruby.net/en/?InstallGuide
    It was the only straight installation manual that I found out there and
    it was a great help.

    Note: pay attention on which version of Apache are you going to make the
    installation (Apache or Apache2).

    Best regards,
    Alin.

    --
    Posted via http://www.ruby-forum.com/.
    Alin Popa, Feb 1, 2007
    #2
    1. Advertising

  3. Alin Popa Guest

    Alin Popa wrote:
    > wrote:
    >> Hi,
    >>
    >> I have Apache 2.2 installed on my Fedora Core 5 Linux machine. I
    >> created this file, "test.rb" at my public document root
    >>
    >> #!/usr/local/bin/ruby
    >> print "Content-type: text/html\r\n\r\n"
    >> print "<html><body>Hello everybody!!!!</body></html>\r\n"
    >>
    >> and when i visit http://mydomain.com/test.rb, the output is
    >>
    >> #!/usr/local/bin/ruby
    >> print "Content-type: text/html\r\n\r\n"
    >> print "<html><body>Hello SAm and Lisa!!!!</body></html>\r\n"
    >>
    >> That's right, it's just the same file. So my question is, what
    >> directives to I need to add to my "httpd.conf" file to make this file
    >> interpret? I am surprised by how little documentation there is on how
    >> to do this.
    >>
    >> Thanks, - Dave

    >
    > Hi Dave,
    >
    > Please take a look at: http://wiki.modruby.net/en/?InstallGuide
    > It was the only straight installation manual that I found out there and
    > it was a great help.
    >
    > Note: pay attention on which version of Apache are you going to make the
    > installation (Apache or Apache2).
    >
    > Best regards,
    > Alin.


    Sorry, I forgot one more thing:
    The installation above is about linux (or this is where it helped me)
    For win32 install, check that: http://www.hiveminds.co.uk/node/3094

    Alin.

    --
    Posted via http://www.ruby-forum.com/.
    Alin Popa, Feb 1, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aliki
    Replies:
    3
    Views:
    749
    LostAtC
    Sep 24, 2004
  2. Alexander Fillips
    Replies:
    3
    Views:
    765
    Alexander Fillips
    May 10, 2005
  3. Peter J. Bismuti
    Replies:
    4
    Views:
    256
    Diez B. Roggisch
    Nov 13, 2007
  4. Passiday
    Replies:
    1
    Views:
    273
    Passiday
    Dec 15, 2011
  5. Dick Davies

    cant get mod-ruby working on apache2

    Dick Davies, Apr 26, 2004, in forum: Ruby
    Replies:
    3
    Views:
    128
    Dick Davies
    Apr 27, 2004
Loading...

Share This Page