You are not logged in.

#1 2012-05-23 11:49:43

zexar
Member
Registered: 2009-05-15
Posts: 23

[SOLVED] gem installs packages only to home directory

Hello!

I need help. I have installed ruby and I'm trying to install it packages. But I have a problem.

All gems I try to install have placed in HOME/.gem directory. Myself home, if I install from my account, or root home, if I use sudo.

gem help install

This command shows in "Defaults" section that install dir is "/usr/lib/ruby/gems/1.9.1". But during installation it ignores this. And even option "--install-dir" have no effect. Packages was installed into HOME directory anyway.

Thank you.

Last edited by zexar (2012-05-23 13:44:48)

Offline

#2 2012-05-23 13:43:46

zexar
Member
Registered: 2009-05-15
Posts: 23

Re: [SOLVED] gem installs packages only to home directory

I tried to reinstall whole ruby package and it shows after install

The default location of gem installs is $HOME/.gem/ruby
Add the following line to your PATH if you plan to install using gem
$(ruby -rubygems -e "puts Gem.user_dir")/bin
If you want to install to the system wide location, you must either:
edit /etc/gemrc or run gem with the --no-user-install flag.

I corrected gemrc and now all working.

Offline

#3 2012-05-23 15:02:48

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] gem installs packages only to home directory

If you want to install system wide, write a PKGBUILD or use the ruby virtual env system. Else you might find yourself in a world of pain and file conflicts.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB