views:

206

answers:

2

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.

+3  A: 

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
tadman
Thanks for the answer. So would it be safe for me to remove the 10.6 disritution bundled gems and simply use RubyGems?
Adam T
I think you can leave them alone and just use the ports ruby for all your development work. As they're managed by the system, and may be patched in the future, best to leave them as they are.
tadman
+1  A: 

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.

colinm