Jilani Khaldi <jilanik / tin.it> writes:

> 1) as subject;

It depends on your platform, and whether you built the original Ruby
with shared libraries.

Assuming a recent Apache under Linux:

  1. Build and install Ruby. Make sure it works.

  2. In the mod_ruby directory, use

       ruby Makefile.RB --apxs=<path to apxs>

     apxs is a script in the Apache bin directory that helps mod_ruby
     with its configuration.

  3. If you didn't specify otherwise when you built Ruby, then you are
     not using a shared Ruby library. In this case, there's a bug in
     the process that generates the mod_ruby makefile. Edit that
     makefile, and look for the line

        LIBRUBYARG = $(LIBRUBY_A)

     Change this to

        LIBRUBYARG = -L<path to ruby lib dir> -lruby

     For example:

        LIBRUBYARG = -L/usr/local/lib/ruby/1.5/i686-linux -lruby

   4. make && make install

   5. Edit your httpd.conf files as described in the readme.

   6. Restart apache and have a play.
  
> 2) once Ruby is compiled as Apache module, is it still possible to run
> Ruby scripts from the comand line? What are the limitations?

You're compiling a separate library module for this, so it doesn't
affect the Ruby interpreter.


Good luck,


Dave