# Rubygems: System variables I'm missing?

**URL:** <https://www.ruby-forum.com/t/rubygems-system-variables-im-missing/176522>\
**Category:** Ruby\
**Created:** [October 1, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/rubygems-system-variables-im-missing/176522 "2009-10-01T16:26:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![enchanter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@enchanter](https://www.ruby-forum.com/u/enchanter)\
**Post date:** [October 1, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/rubygems-system-variables-im-missing/176522/1 "2009-10-01T16:26:35Z")

</div>

Hello! I have irb/gem/ruby1.9 installed in /opt/local/bin. Recently I  
tried to install ‘wirble’…

/opt/local/bin/gem1.9 install wirble

I got a message abuot not having write access to /opt/…/gems or  
something along those lines, so it said it would install to ~/.gems,  
which I thought was just fine (and it goes on to say since i done have  
~/.gems/ruby/1.9/bin in my path, I cant run gem executable. Fine for  
now, I’ll change it later.). But when I go into irb1.9 and hit ‘require  
“wirble”’, I get an unknown gem error.

I’m thinking I’m missing some sort of system variable to determine otehr  
gem paths for including.

Any help?

---

<div class="post-metadata">

**Author:** ![enchanter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@enchanter](https://www.ruby-forum.com/u/enchanter)\
**Post date:** [October 1, 2009, 6:34pm UTC](https://www.ruby-forum.com/t/rubygems-system-variables-im-missing/176522/2 "2009-10-01T18:34:40Z")

</div>

> “wirble”’, I get an unknown gem error.
> 
> I’m thinking I’m missing some sort of system variable to determine  
> otehr  
> gem paths for including.
> 
> Any help?

Your message isn’t clear, but I suspect that the message you are seeing  
Is saying you DON’T have ~/.gems/ruby/1.9/bin in your path. You can  
check this  
easily. Assuming you are using bash just do:

echo $PATH

Does that have ~/.gems/ruby/1.9/bin? If not you can add it temporarily:

PATH=$PATH:~/.gems/ruby/1.9/bin  
export PATH

This will do what you need until the next time you log out or close the  
terminal.  
To make it permanent, add the 2 lines above to ~/.bashrc (may vary by  
system).

Note: If there are other users on this system that will also want to use  
wirble,  
you definitely want to sudo or su, so it can be installed in the global  
gems location.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![enchanter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/ce7236/32.png) [@enchanter](https://www.ruby-forum.com/u/enchanter)\
**Post date:** [October 2, 2009, 9:05am UTC](https://www.ruby-forum.com/t/rubygems-system-variables-im-missing/176522/3 "2009-10-02T09:05:46Z")

</div>

- Tim M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) (16:26) schrieb:

> Hello! I have irb/gem/ruby1.9 installed in /opt/local/bin. Recently I  
> tried to install ‘wirble’…
> 
> /opt/local/bin/gem1.9 install wirble
> 
> I got a message abuot not having write access to /opt/…/gems or  
> something along those lines, so it said it would install to ~/.gems,  
> which I thought was just fine (and it goes on to say since i done have  
> ~/.gems/ruby/1.9/bin in my path, I cant run gem executable. Fine for  
> now, I’ll change it later.).

Yes, install with sudo if you want it to go into opt.

> But when I go into irb1.9 and hit ‘require  
> “wirble”’, I get an unknown gem error.

Hm, I recently installed FFI into my home path, no problem requiring and  
using that in irb1.9.

> I’m thinking I’m missing some sort of system variable to determine otehr  
> gem paths for including.

Sorry, no help.

mfg, simon … l
