Rubygems: System variables I'm missing?

T

Tim Mcd

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?
 
W

Walton Hoops

Hello! I have irb/gem/ruby1.9 installed in /opt/local/bin. Recently I
tried to install 'wirble'...
=20
/opt/local/bin/gem1.9 install wirble
=20
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.
=20
I'm thinking I'm missing some sort of system variable to determine
otehr
gem paths for including.
=20
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=3D$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!
 
S

Simon Krahnke

* Tim Mcd said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top