# Where is $: defined?

**URL:** <https://www.ruby-forum.com/t/where-is-defined/82138>\
**Category:** Ruby\
**Created:** [January 17, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/where-is-defined/82138 "2007-01-17T20:43:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 17, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/where-is-defined/82138/1 "2007-01-17T20:43:13Z")

</div>

I’m installing my own ruby but need to use the other gnu tools from my  
co-worker, who has ruby too. I 'm doing this to try stuff first before I  
ask  
him to install it in his ruby, which is our standard.

However, my ruby is picking up library from his ruby installation  
instead of  
mine. I don’t have any RUBY\* environment variable, I don’t find his path  
in  
my ruby Makefile nor configuration.

I did:  
configure --prefix=/login/asn  
make  
make install

I do have my co-worker bin directory in my $PATH (then I removed it  
afterward). Could my ruby installation picked up the library location  
from  
the existing ruby (my co-worker’s)? How to tell it not to?

I know there are probably many variables that might have caused it, but  
if I  
know how that $: is set, I thought it might help. What could have set $:  
when I build my ruby?

I’ve spending hours already to sort this out without any luck.

-andre

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 17, 2007, 9:35pm UTC](https://www.ruby-forum.com/t/where-is-defined/82138/2 "2007-01-17T21:35:29Z")

</div>

On 1/17/07, Andreas S [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> make  
> I’ve spending hours already to sort this out without any luck.  
> I suppose the default is compiled-in (the configure --something should  
> be the right path)  
> Note that this is just a hint, I’m not sure nor I have checked that.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 17, 2007, 11:49pm UTC](https://www.ruby-forum.com/t/where-is-defined/82138/3 "2007-01-17T23:49:56Z")

</div>

> 

I don’t see that incorrect path for $: defined any where in config\* file  
or  
Makefile. It guess it must be derived from something. The miniruby got  
it  
right. The compiled ruby got it wrong.

[nm12681:ruby-junk] ./miniruby -e ‘puts $:’  
/login/asn/lib/ruby/site\_ruby/1.8  
/login/asn/lib/ruby/site\_ruby/1.8/i686-linux  
/login/asn/lib/ruby/site\_ruby  
/login/asn/lib/ruby/1.8  
/login/asn/lib/ruby/1.8/i686-linux  
…  
[nm12681:ruby-junk] ./ruby -e ‘puts $:’  
/tools/xd/ruby-1.8.5/lib/ruby/site\_ruby/1.8  
/tools/xd/ruby-1.8.5/lib/ruby/site\_ruby/1.8/i686-linux  
/tools/xd/ruby-1.8.5/lib/ruby/site\_ruby  
/tools/xd/ruby-1.8.5/lib/ruby/1.8  
/tools/xd/ruby-1.8.5/lib/ruby/1.8/i686-linux

Don’t know why the compiled ruby has wrong $: and why it’s different  
than  
miniruby’s $:. It looks like a particular problem, though, only when I  
included my co-worker bin path.

I got it compiled with using different path (it has older gnu tools).  
This  
time the $: is correct. It picks up my ruby library.

-andre
