You are not logged in.

#1 2012-03-01 20:54:48

hushkyotosleeps
Member
From: Chicago, IL
Registered: 2010-09-17
Posts: 13
Website

ruby upgrade "breaks" system-wide rubygems

I just performed a new Arch install, and installed Ruby through pacman - then proceeded to first update rubygems after and install a few gems that were meant to be available system wide. This worked as you would expect previously, but that appears to no longer be the case:

[root@nia srv]# gem update --system
Updating rubygems-update
Fetching: rubygems-update-1.8.17.gem (100%)
WARNING:  You don't have /root/.gem/ruby/1.9.1/bin in your PATH,
          gem executables will not run.
Successfully installed rubygems-update-1.8.17
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - /usr/lib/ruby/gems/1.9.1/gems/rubygems-update-1.8.17

It looks like this is being caused by the --user-install option being placed in /etc/gemrc - somewhere between ruby-1.9.3_p0-3 and ruby-1.9.3_p125-1 (that general since those are the only packages in my package cache).

I went ahead and commented it out for now - but does anyone know if there was a specific reason to have that option applied for all users, including root? It doesn't really make much sense (to me at least) to have gems installed in root's home directory. I'd think a better solution would be to have a .gemrc in /etc/skel/. Any thoughts?

(also, wasn't sure which subforum this should have gone to - package upgrade issues vs app issues - but it does seem arch-specific)


a.k.a. liliff/musee. milk tea fuzz

Offline

#2 2012-03-16 19:37:40

Axell
Member
Registered: 2009-01-11
Posts: 43

Re: ruby upgrade "breaks" system-wide rubygems

/etc/gemrc says:
# --user-install is used to install to $HOME/.gem/ by default since we want to separate
#                pacman installed gems and gem installed gems

Offline

#3 2012-03-17 02:04:43

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: ruby upgrade "breaks" system-wide rubygems

Offline

#4 2012-04-01 20:19:13

rps63ifid
Member
From: Idaho, US
Registered: 2008-08-02
Posts: 39
Website

Re: ruby upgrade "breaks" system-wide rubygems

I just bumped into this, too. The easiest way to have gems installed and available system-wide is to use the --no-user-install option...

--
/ron

Offline

#5 2012-04-05 12:02:11

sergeykish
Member
Registered: 2010-07-18
Posts: 15

Re: ruby upgrade "breaks" system-wide rubygems

hushkyotosleeps wrote:

It doesn't really make much sense (to me at least) to have gems installed in root's home directory. I'd think a better solution would be to have a .gemrc in /etc/skel/.

I can't agree more. Several years with Arch and ruby without any issue untill today.
That change introduce magic and gives nothing back.

Root installs systemwide, think of `gem install` as `./configure && make && make install`
Explicit configuration required to change install path. With `./configure --prefix=$HOME/foo && make && make install` or `gem install --user-install`

Obviously next step is changing default `make` behaviour.

Offline

#6 2012-04-05 14:36:56

sergeykish
Member
Registered: 2010-07-18
Posts: 15

Re: ruby upgrade "breaks" system-wide rubygems

I've filled the bug https://bugs.archlinux.org/task/29292

Arch for me is simple, working system. One could customize its behaviour here and there. But system should work out of the box. With clean $HOME.

Offline

Board footer

Powered by FluxBB