Apache using older ruby

Hello List,
I’m running into some problems serving rhtml files on OSX Tiger. I’m a
bit of a noob so I apologize if the answer to my question is an obvious
one. I have both 1.8.2 and 1.8.4 installed on my computer. I setup my
environment(I think) to use .4 if I start ruby up in bash:

ruby -v
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.6.0]

but RUBY_VERION in an rhtml file says .2

I’m also unsure of how to include gems in my rhtml file.

<%
require ‘rubygems’
require ‘active_record’
%>

throws:
###########
Script Error

No such file to load – rubygems

Backtrace

(erb):3:in `require’
(erb):3
/Users/maxb/Sites/cgi-bin/erb.cgi:36
##########

I used Martin Dittus’ howto when setting up apache
http://dekstop.de/weblog/2006/01/rhtml_on_osx_with_apache_and_erb/

best
Max

Max B. wrote:

Serving .rhtml Files on OS X With Apache and ERB - dekstop weblog

best
Max


Posted via http://www.ruby-forum.com/.

Open up Terminal.app and do “echo $PATH” then at the prompt do “which
ruby”, notice which path is first and which ruby version shows up.
Chances are you haven’t set your path correctly.

:Robert

Robert H. wrote:

Max B. wrote:

Serving .rhtml Files on OS X With Apache and ERB - dekstop weblog

best
Max


Posted via http://www.ruby-forum.com/.

Open up Terminal.app and do “echo $PATH” then at the prompt do “which
ruby”, notice which path is first and which ruby version shows up.
Chances are you haven’t set your path correctly.

:Robert

Nope, I set the path correctly in my /etc/profile $PATH shows that the
path is correct as does “which ruby” and “ruby -v”. Apache still likes
the older one better.
Best

On Jul 26, 2006, at 14:24, Max B. wrote:

Nope, I set the path correctly in my /etc/profile $PATH shows that the
path is correct as does “which ruby” and “ruby -v”. Apache still likes
the older one better.

I’d suggest reviewing the recent discussion thread entitled “Mac OSX
Ruby Configuration Question” that ran from July 18th to July 23rd. A
lot of information about controlling the path under OSX was posted
there.