You are not logged in.

#1 2012-05-26 10:17:11

jiewmeng
Member
Registered: 2012-02-09
Posts: 118

Where are ruby gem installed

I just installed Ruby Gem for AppFog

sudo gem install af

But ...

[jiewmeng@JM ruby]$ af login
bash: af: command not found

I think its not finding the gem, I fixed this before, but forgot ...


Computer Science Student, Web Developer

Offline

#2 2012-05-26 11:59:02

marenkay
Member
From: Germany
Registered: 2011-05-29
Posts: 6
Website

Re: Where are ruby gem installed

Unless you specify

--no-user-install

the gem tool will try to install into the user directory for a while now.

I have added /etc/profile.d/rubygems.sh to my system containing:

export PATH="$PATH:$(ruby -rubygems -e 'puts Gem.user_dir')/bin"
export GEM_HOME="$(ruby -rubygems -e 'puts Gem.user_dir')"

which results in gems being installed into the user .gem directory, and also adds it to the users PATH.

Offline

Board footer

Powered by FluxBB