[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

rhtml can't find rubygems

Max Benjamin

7/23/2006 10:10:00 PM

I'm having some problems including rubygems in rhtml files. I'm on OSX
Tiger and I set up apache to serve rhtml files(herein may lie the
problem). While certain libs load fine ie 'open-uri' attempting to
require 'rubygems' like so:

##############
<%
require 'open-uri'
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

Environment

DOCUMENT_ROOT = /Library/WebServer/Documents
HTTP_ACCEPT =
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING = gzip,deflate
HTTP_ACCEPT_LANGUAGE = en-us,en;q=0.5
HTTP_CONNECTION = keep-alive
HTTP_HOST = 127.0.0.1
HTTP_KEEP_ALIVE = 300
HTTP_USER_AGENT = Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
PATH =
/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices
REDIRECT_SCRIPT_URI =
http://max-benjamins-computer.local/~maxb/wheresThe...
REDIRECT_SCRIPT_URL = /~maxb/wheresTheBeef.rhtml
REDIRECT_STATUS = 200
REDIRECT_URL = /~maxb/wheresTheBeef.rhtml
REMOTE_ADDR = 127.0.0.1
REMOTE_PORT = 56404
SCRIPT_FILENAME = /Users/maxb/Sites/cgi-bin/erb.cgi
SCRIPT_URI =
http://max-benjamins-computer.local/~maxb/wheresThe...
SCRIPT_URL = /~maxb/wheresTheBeef.rhtml
SERVER_ADDR = 127.0.0.1
SERVER_ADMIN = [no address given]
SERVER_NAME = max-benjamins-computer.local
SERVER_PORT = 80
SERVER_SIGNATURE =
Apache/1.3.33 Server at max-benjamins-computer.local Port 80


SERVER_SOFTWARE = Apache/1.3.33 (Darwin) PHP/5.1.2
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = HTTP/1.1
REQUEST_METHOD = GET
QUERY_STRING =
REQUEST_URI = /~maxb/wheresTheBeef.rhtml
SCRIPT_NAME = /~maxb/cgi-bin/erb.cgi
PATH_INFO = /~maxb/wheresTheBeef.rhtml
PATH_TRANSLATED = /Users/maxb/Sites/wheresTheBeef.rhtml

/Users/maxb/Sites/cgi-bin/erb.cgi -- Sun, 23 Jul 2006 21:54:56 GMT
#############

Best
M

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

6 Answers

anne001

7/23/2006 11:40:00 PM

0

is rubygems a library? is so, giving the full unix path might solve
your problem for now?

what is your $PATH? are you using 1.8.2 or 1.8.4?

Max Benjamin

7/24/2006 9:56:00 PM

0

anne001 wrote:
> is rubygems a library? is so, giving the full unix path might solve
> your problem for now?
>
> what is your $PATH? are you using 1.8.2 or 1.8.4?

Hmm. I have both versions, gems being installed for 1.8.4. Checking
RUBY_VERSION in an rhtml file apache appears to be using the older
verion while running ruby -v in bash it's .4 can anyone tell me where I
need to make changes so that systemwide I'm using .4. httpd.conf?

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

Max Benjamin

7/24/2006 10:19:00 PM

0

Max Benjamin wrote:
> anne001 wrote:
>> is rubygems a library? is so, giving the full unix path might solve
>> your problem for now?
>>
>> what is your $PATH? are you using 1.8.2 or 1.8.4?
>
> Hmm. I have both versions, gems being installed for 1.8.4. Checking
> RUBY_VERSION in an rhtml file apache appears to be using the older
> verion while running ruby -v in bash it's .4 can anyone tell me where I
> need to make changes so that systemwide I'm using .4. httpd.conf?
>
> I used Martin Dittus' howto when setting up apache
> http://dekstop.de/weblog/2006/01/rhtml_on_osx_with_apach...
>
> best
> Max

Also I have the newer ruby in /usr/bin and the older in /usr/local/lib
if that helps
M

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

Day, Chuck

7/24/2006 10:43:00 PM

0

Please unsubscribe me.

Thank you.
Chuck

Bill Guindon

7/24/2006 10:46:00 PM

0

On 7/24/06, Day, Chuck <chuck.day@medtronic.com> wrote:
> Please unsubscribe me.

Look in the email header:
List-Unsubscribe: <mailto:ruby-talk-ctl@ruby-lang.org?body=unsubscribe>

> Thank you.

You're welcome.

> Chuck
>
>

--
Bill Guindon (aka aGorilla)
The best answer to most questions is "it depends".

Mat Schaffer

7/25/2006 12:52:00 PM

0

> Look in the email header:
> List-Unsubscribe: <mailto:ruby-talk-ctl@ruby-lang.org?
> body=unsubscribe>


On Jul 25, 2006, at 12:41 AM, Tanushree Bhoi wrote:

> Please unsubscribe me.
>
> Thanks
>
> Tanushee Bhoi
>
>
> On 7/25/06, Bill Guindon <agorilla@gmail.com> wrote:
>>
>> On 7/24/06, Day, Chuck <chuck.day@medtronic.com> wrote:
>> > Please unsubscribe me.
>>
>> Look in the email header:
>> List-Unsubscribe: <mailto:ruby-talk-ctl@ruby-lang.org?
>> body=unsubscribe>
>>
>> > Thank you.
>>
>> You're welcome.
>>
>> > Chuck
>> >
>> >
>>
>> --
>> Bill Guindon (aka aGorilla)
>> The best answer to most questions is "it depends".
>>
>>
>
>
> --
> Thanks & Regards
> Tanushree Bhoi
> Software Engineer
> applabs Technologies
> e-mail : tanushree.bhoi@applabs.com
> :tanushree.bhoi@gmail.com