Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#12631 - [rubygems] does not see installed gems

Attached to Project: Community Packages
Opened by Paul Philippov (themactep) - Wednesday, 31 December 2008, 22:22 GMT
Last edited by Allan McRae (Allan) - Friday, 18 September 2009, 01:37 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Kessia Pinheiro (even)
Architecture All
Severity High
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
ruby does not see installed gems

Additional info:
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
rubygems 1.3.1

Steps to reproduce:
# gem list
*** LOCAL GEMS ***

hpricot (0.6.164)
xml-simple (1.0.11)
zoom (0.4.1)

# ruby -e 'require "hpricot"'
-e:1:in `require': no such file to load -- hpricot (LoadError)
from -e:1

# ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]

# gem --version
1.3.1
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 18 September 2009, 01:37 GMT
Reason for closing:  Fixed
Additional comments about closing:  ruby-1.9
Comment by Allan McRae (Allan) - Thursday, 01 January 2009, 03:59 GMT
I was testing this out and got the following output when installing a gem:

WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /home/allan/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.

Where are yours installed and is it in your path?
Comment by Paul Philippov (themactep) - Thursday, 01 January 2009, 09:14 GMT
mine is installed to system place but anyway, i found that RUBYOPT was not setup. export RUBYOPT=rubygems made it work like a charm. maybe installation of rubygems package should add it to environment variables automatically?
Comment by Allan McRae (Allan) - Thursday, 01 January 2009, 09:18 GMT
Adding rubygems maintainer to assignees.
Comment by Kessia Pinheiro (even) - Tuesday, 06 January 2009, 17:34 GMT
PLease, see that and tell me if is really necessary add the env variable: http://rubygems.org/read/chapter/3#page70
Comment by Paul Philippov (themactep) - Tuesday, 06 January 2009, 18:33 GMT
on gentoo (which is my main working platform) installation of rubygems would install gem loading helper as /usr/lib/ruby/site_ruby/auto_gem.rb, and add corresponding environment settings:

contents of auto_gem.rb:
------------------------
# This file is installed by Gentoo's rubygems package.
# It's intended to help automate the loading of rubygems

begin
require 'rubygems'
rescue LoadError
end
---- end ----

$ env | grep RUBY
RUBYOPT=-rauto_gem

that is really useful as you don't have to require rubygems explicitly to every ruby script. i expected to have a similar behaviour on arch linux as well =)
Comment by Allan McRae (Allan) - Wednesday, 07 January 2009, 02:50 GMT
@Kessia: Fixing this "bug" just requires adding a file /etc/profile.d/rubgems.sh (755 permissions) with the "export RUBYOPT=rubygems" line in it to the rubygems package. This is really up to you whether you do this or not, but I don't see the downside in it.
Comment by Kessia Pinheiro (even) - Friday, 27 February 2009, 13:25 GMT
I'll wait some decision for Ruby version 1.9, because it came with rubygems. In next version, i hope this will be in profile.
Comment by Dan Griffiths (Ghost1227) - Sunday, 14 June 2009, 14:37 GMT
Ruby 1.9.1 is out and stable... any reason we can't update and fix this issue?
Comment by Allan McRae (Allan) - Sunday, 14 June 2009, 14:58 GMT
I have put ruby-1.9.1 in [testing]. I believe this is not needed with ruby-1.9 as rubygems is built in but I am not a ruby programmer so could be wrong...
Comment by Ionut Biru (wonder) - Thursday, 17 September 2009, 22:32 GMT
we can close this now that ruby 1.9 is in testing?
Comment by Allan McRae (Allan) - Friday, 18 September 2009, 01:37 GMT
It is now in [extra] so sure..

Loading...