small medium large xlarge

29 Jun 2010, 15:31
Richard Reumann (4 posts)

I’m attempting to follow the instructions in Section1.2 for setting up on Mac. (I have XCode tools already installed.)

I ran

sudo port install ruby

and then ran the following as mentioned in the book:

sudo gem update –system sudo gem uninstall rubygems-update sudo gem update rails –pre sudo gem update rake sudo gem install sqlite3-ruby

The book then mentions to look at the output of “for cmd in ruby irb gem rake; do which $cmd; done”

In my case the output was:

/opt/local/bin/ruby /opt/local/bin/irb /usr/bin/gem /usr/bin/rake

The confusing part now is the PDF mentions:

“All you need to do here is verify that each command is found in the same path, typically /opt/local/bin. If you are finding different tools at different paths, verify that your PATH environment variable is correct and/or reinstall the tool that doesn’t match the desired version of Ruby.”

So after reading that how do I know if I have things set up correctly? Are things ok if you are having gem and rake executables in /usr/bin. It looks like some are pointing to what looks like the default Mac installed version:

~ $ ls -la /usr/bin/gem lrwxr-xr-x 1 root wheel 71 Jan 9 11:51 /usr/bin/gem -> ../../System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem

Is it ok that I’m using some things from /opt/local/bin (assuming from mac ports) and the other from the system install at /usr/bin ?

29 Jun 2010, 20:30
Sam Ruby (633 posts)


That typically means that you are using a different version of gems and rake than you are using of ruby and irb. This causes people to run into problems. I’ve posted instructions on how to recover from this.

30 Jun 2010, 15:34
Richard Reumann (4 posts)

Thanks Sam. The link you provided was perfect.

Although, I wonder if maybe those steps should be added to the book? Wouldn’t a fresh install on the Mac after XCode only have the gem and rake executables pointing to the Mac system ones under /usr/bin ? Maybe I missed something in the book that mentioned you should first download RubyGems and install that and then install rake?

Thanks again.

30 Jun 2010, 15:56
Sam Ruby (633 posts)

maybe those steps should be added to the book</blockquote>

Will do.

You must be logged in to comment