Leopard, where are those Ruby gems?

Ruby Add comments

It’s always useful to check the code of those downloaded Ruby gems. You should try for at least two reasons: learning and submitting bugs. It’s always a good idea to give technical details about bugs you encounter. The community is small and responsive, get involved :)

You’re lucky, Leopard user, Apple made a great work embedding Ruby in Mac OS X 10.5. You have the latest version of Ruby, 1.8.6, and RubyGems installed.

Apple guys set a specific directory for all Ruby related things.

/Library/Ruby/Gems/1.8/

This directory contains exploded gems and their documentation. For example, you can examine the content of the ActiveRecord gem and its documentation with those two commands (I hope you use TextMate…).

mate /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/
open /Library/Ruby/Gems/1.8/doc/activerecord-2.1.0/rdoc/index.html

No need to google “activerecord”, everything’s on you hard drive.

Note: Rubygems has evolved since the release of Leopard. But hopefully, it’s simple to update it. Just download the last version and one simple command will do the work.

2 Responses to “Leopard, where are those Ruby gems?”

  1. vadimanian Says:

    Nicolas, thank you very much for this, this is very interesting. But I’ve seen RoR 2.1 is out, do you know when MacOS will ship this instead of 1.8.6? Thanks.

  2. Nicolas Says:

    vadimanian, it seems that you’ve mixed up Rails and Ruby.
    Ruby is a programming language, and Rails is a web framework written with this language. So Ruby 1.8.6 is compatible with Rails 2.1.0.

    By the way, Ruby 1.8.7 has been released one week ago.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Log in