You are not logged in.

#1 2008-12-14 23:54:07

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

some users can't find ruby gems

As root I've used "gem install" to install a number of gems. The files appear in /usr/lib/ruby/gems/1.8/gems and some users can access them but others can't. They get errors like this:

./docx.rb:3:in `require': no such file to load -- zip/zip (LoadError)
        from ./docx.rb:3

I guess that it is a path issue but I compared the working and non-working users looking for RUBYLIB or RUBYPATH but no one has it set. Can anyone suggest what the differences could be?

Offline

#2 2009-01-06 05:43:32

lamnk
Member
Registered: 2008-01-30
Posts: 65
Website

Re: some users can't find ruby gems

The line

require 'rubygems'

is required before you include other gems in your script.

Last edited by lamnk (2009-01-06 05:52:15)

Offline

#3 2009-01-06 09:07:40

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: some users can't find ruby gems

I think as an alternative you can do this:

export RUBYOPT="rubygems"

before running the script.

Offline

#4 2009-01-06 19:56:10

lamnk
Member
Registered: 2008-01-30
Posts: 65
Website

Re: some users can't find ruby gems

Btw, i had an identical problem with the xml-mapping gem. This gem always complains although other gems work. It turns out to be a permission problem, and you must chmod the library files to 644 so that your users can access them.

Last edited by lamnk (2009-01-06 19:58:02)

Offline

Board footer

Powered by FluxBB