[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Apache using older ruby

Max Benjamin

7/25/2006 6:04:00 PM

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_apach...


best
Max

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

3 Answers

Robert H

7/25/2006 6:23:00 PM

0


Max Benjamin wrote:
> 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_apach...
>
>
> best
> Max
>
> --
> Posted via http://www.ruby-....

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

Max Benjamin

7/26/2006 9:24:00 PM

0

Robert Hicks wrote:
> Max Benjamin wrote:
>>
>>
>> http://dekstop.de/weblog/2006/01/rhtml_on_osx_with_apach...
>>
>>
>> best
>> Max
>>
>> --
>> Posted via http://www.ruby-....
>
> 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

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

Dave Howell

7/27/2006 1:00:00 AM

0


On Jul 26, 2006, at 14:24, Max Benjamin 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.