Apache using older ruby

M

Max Benjamin

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
 
M

Max Benjamin

Robert said:
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
 
D

Dave Howell

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,209
Messages
2,571,088
Members
47,684
Latest member
sparada

Latest Threads

Top