Adam T
Adam T

Reputation: 251

RubyGems Environment (Snow Leopard)

Greetings,

My question is why do I have 3 separate gem paths. My 'gem environment' command displays the following:

GEM PATHS
- /Library/Ruby/Gems/1.8
- /Users/adam/.gem/ruby1.8 --This one makes sense to me
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

Why the two separate "system" paths?

Thanks.

Upvotes: 0

Views: 412

Answers (2)

colinm
colinm

Reputation: 4288

Why the two separate "system" paths?

Because Mac OS X (as with historical versions) is designed with a separation between system libraries and third-party libraries.

Only Apple should ever touch the /System hierarchy, while any third-party software is free to install system-wide modifications within the /Library hierarchy.

Upvotes: 1

tadman
tadman

Reputation: 211560

If you're using the stock Ruby that comes with OS X 10.6, it includes several different library bundles:

# /Library/Ruby/Gems/1.8
# => Standard Gems, default install location
# ~/.gem/ruby1.8
# => User-specific gems
# /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
# => 10.6 distribution bundled gems: Rails, Ferret, Capistrano, etc. 

The port installed gem environment is different:

# /opt/local/lib/ruby/gems/1.8
# => Standard gems, default install location
# ~/.gem/ruby/1.8
# => User-specific gems

Upvotes: 3

Related Questions