[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Help configuring apache2 + mod_ruby :) from a newbie

Andrew Backer

4/9/2005 3:22:00 AM

Just getting started with apache, ruby, mod_ruby, and trying to do it
all at once.

I can't seem to get any of my .rbx files to be recognized, they keep
getting spit back at me as plain text. I assume there is some
configuration detail that I am missing, but I have not a clue. It
doesn't complain about loading the module, so I assume it's working
right

If anyone can help me it'd be much appreciated. Everything I can
really find referst to apache 1.3, or don't seem to work for me.

The basic info :

Server version: Apache/2.0.53
ruby 1.8.2 (2004-12-25) [i686-linux]

// in /etc/conf.d/apache2 ------------------
APACHE2_OPTS="-D SSL -D RUBY"

// modules.d/20_mod_ruby.conf -------
<IfDefine RUBY>
<IfModule !mod_ruby.c>
LoadModule ruby_module modules/mod_ruby.so
</IfModule>
</IfDefine>
# taken from the example file
# If the ruby module is installed, this will be enabled.
<IfModule mod_ruby.c>
# for Apache::RubyRun
RubyRequire apache/ruby-run

# exec files under /ruby as ruby scripts.
<Location /ruby>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
Options ExecCGI
</Location>

# exec *.rbx as ruby scripts.
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
# the rest is commented out

Thanks for any help,
Andrew

6 Answers

Paul Hanchett

4/9/2005 8:17:00 PM

0

Andrew Backer wrote:
> Just getting started with apache, ruby, mod_ruby, and trying to do it
> all at once.
>
> I can't seem to get any of my .rbx files to be recognized, they keep
> getting spit back at me as plain text. I assume there is some
> configuration detail that I am missing, but I have not a clue. It
> doesn't complain about loading the module, so I assume it's working
> right
>
The key for me was turning on ExecCGI in the directory where the scripts
are located.

Paul

Mark Hubbart

4/9/2005 8:48:00 PM

0

On Apr 8, 2005 8:24 PM, Andrew Backer <awbacker@gmail.com> wrote:
> Just getting started with apache, ruby, mod_ruby, and trying to do it
> all at once.
>
> I can't seem to get any of my .rbx files to be recognized, they keep
> getting spit back at me as plain text. I assume there is some
> configuration detail that I am missing, but I have not a clue. It
> doesn't complain about loading the module, so I assume it's working
> right
>
> If anyone can help me it'd be much appreciated. Everything I can
> really find referst to apache 1.3, or don't seem to work for me.
>
> The basic info :
>
[...]

I have mine set like this:
>
> # exec *.rbx as ruby scripts.
> <Files *.rbx>
Options ExecCGI
> SetHandler ruby-object
> RubyHandler Apache::RubyRun.instance
> </Files>
> # the rest is commented out
>
> Thanks for any help,
> Andrew

HTH,
Mark


Andrew Backer

4/10/2005 4:57:00 PM

0

I added the "Options ExecCGI" to my mod_ruby.conf, and am still not
getting any output.

In addition, and I'm not sure its related directly to that change, i
have loading errors again and get segfaults on acessing a .rbx file.

I am beginning to think there is some or other serious issue with the
latest mod_ruby and apache2. :-/

Here is a snippet from the log file

[notice] Digest: generating secret for digest authentication ..
Digest: done
[error] mod_ruby: failed to require apache/ruby-run
[error] mod_ruby: error in ruby
mod_ruby: ruby:0:in `require': No such file to load -- apache/ruby-run
(LoadError)


// when accessing a .rbx file
[notice] child pid 20370 exit signal Segmentation fault (11)

Paul Hanchett

4/11/2005 4:05:00 PM

0

I grabbed a file called "RubyForApache" and installed it. There were
some files there which I did't have... (I don't remember exactly what I
did with them, sorry.)

Andrew Backer wrote:
> I added the "Options ExecCGI" to my mod_ruby.conf, and am still not
> getting any output.
>
> In addition, and I'm not sure its related directly to that change, i
> have loading errors again and get segfaults on acessing a .rbx file.
>
> I am beginning to think there is some or other serious issue with the
> latest mod_ruby and apache2. :-/
>
> Here is a snippet from the log file
>
> [notice] Digest: generating secret for digest authentication ..
> Digest: done
> [error] mod_ruby: failed to require apache/ruby-run
> [error] mod_ruby: error in ruby
> mod_ruby: ruby:0:in `require': No such file to load -- apache/ruby-run
> (LoadError)
>
>
> // when accessing a .rbx file
> [notice] child pid 20370 exit signal Segmentation fault (11)
>

Andrew Backer

4/12/2005 2:39:00 AM

0

Thanks for the idea. Check up on it and it's windows only tho :( Not
sure if I mentioned that I am running linux.

I think it's hilarious, it's easier to get ruby+apache working on
*windows* than on linux. ha! take that zealots! Since i have decided
to try to use ruby + mysql/postgres for a project, I may just have to
switch back to windows :(

Aredridel

4/12/2005 2:46:00 AM

0

On Apr 11, 2005 8:39 PM, Andrew Backer <awbacker@gmail.com> wrote:
> Thanks for the idea. Check up on it and it's windows only tho :( Not
> sure if I mentioned that I am running linux.
>
> I think it's hilarious, it's easier to get ruby+apache working on
> *windows* than on linux. ha! take that zealots! Since i have decided
> to try to use ruby + mysql/postgres for a project, I may just have to
> switch back to windows :(

It's all a matter of which unix!

$ poldek -i apache-mod_ruby rails ruby-postgres postgresql

Done! (That's PLD, by the way)