# Installing Ruby on Rails on Leopard

**URL:** <https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065>\
**Category:** Rails\
**Created:** [December 24, 2007, 9:10am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065 "2007-12-24T09:10:57Z")\
**Posts on this page:** 11\
**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:** [December 24, 2007, 9:10am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/1 "2007-12-24T09:10:57Z")

</div>

I am completely new to Ruby on Rails, and programming in general, and  
so I have what imagine are two pretty idiotic questions:

1. I am trying to install all of the components I need to run RoR on  
OS X Leopard (following instructions at  
[Andrew Nesbitt | Andrew is a software developer, based in Somerset, UK. He spends most of his days programming in Ruby, contributing to open source projects and organising local developer user groups.](http://teabass.com/super-simple-ruby-on-rails-install-with-macports-for-leopard/#comment-1993)).

I got up to the part where I type “sudo gem update” into Terminal, and  
all was well, until I got this error:

* * *

Attempting remote update of rubynode  
Building native extensions. This could take a while…  
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)  
ERROR: Failed to build gem native extension.

# ruby extconf.rb update ==================== ERROR ===================== Please set RUBY\_SOURCE\_DIR to the source path of ruby 1.8.6 (2007-09-23)!

* * *

Any thoughts on how to get past this?

1. Before I hit the above snag, I accidentally selected “fastthread  
1.0.1 (mswin32)” instead of “fastthread 1.0.1 (ruby)”, during the gem  
update. How can I now install the correct version of fastthread? (not  
even sure what that is, but it seems important).

Many thanks.

---

<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:** [December 24, 2007, 9:27am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/2 "2007-12-24T09:27:58Z")

</div>

On Dec 24, 2007 12:10 AM, David T [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I got up to the part where I type “sudo gem update” into Terminal, and  
> all was well, until I got this error:

Run the following on a terminal:

gem env

to see current gem version. The latest version is 1.0.1. You have to  
upgrade  
the Ruby Gems before upgrading the gems on your machine. So, run: sudo  
gem  
update --system.

If it hangs then try:

sudo gem install rubygems-update  
sudo update\_rubygems

> Any thoughts on how to get past this?
> 
> 1. Before I hit the above snag, I accidentally selected “fastthread  
> 1.0.1 (mswin32)” instead of “fastthread 1.0.1 (ruby)”, during the gem  
> update. How can I now install the correct version of fastthread? (not  
> even sure what that is, but it seems important).

Just do sudo gem uninstall fastthread and then do sudo gem install  
fastthread.  
If I were you, I would follow Hivelogic article on installing the Rails  
stack.

–  
[http://www.rubyplus.org/](http://www.rubyplus.org/)  
Free Ruby Screencasts

---

<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:** [December 25, 2007, 4:34am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/3 "2007-12-25T04:34:29Z")

</div>

Thanks! Now a follow-up question:

I ran:

sudo gem update --system

It updated me to 1.0.1. Do I now have to reinstall gems like  
capistrano and rails?

Unfortunately the Hivelogic article only applies to Tiger – it hasn’t  
been updated yet for Leopard.

---

<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:** [December 25, 2007, 4:47am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/4 "2007-12-25T04:47:23Z")

</div>

Figured it out:

gem list --local

Shows me the list of gems installed.

---

<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:** [December 25, 2007, 5:04am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/5 "2007-12-25T05:04:20Z")

</div>

Oy vey, to be a newbie.

I tried running a test app, using the following procedure, and got the  
following error.

sudo mkdir -p /usr/local/src  
sudo chgrp admin /usr/local/src  
sudo chmod -R 775 /usr/local/src  
cd /usr/local/src

rails testapp  
cd testapp  
script/server

Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`,  
update your RAILS\_GEM\_VERSION setting in  
config/environment.rb for the Rails version you do have installed,  
or comment out RAILS\_GEM\_VERSION to use the latest  
version installed.

The thing is, I’m pretty sure I do have Rails 2.0.2. installed,  
because when I type

rails -v

I get this:

Rails 2.0.2

If I comment out RAILS\_GEM\_VERSION, I get the same error, just without  
“2.0.2.”

---

<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:** [December 25, 2007, 6:26am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/6 "2007-12-25T06:26:41Z")

</div>

Probably not a great idea to create your app under /usr/local. I would  
recommend /var/www or ~/rails or something like that. You’ll find it  
much easier to work with and you won’t constantly be battling the  
system’s permissions settings.

---

<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:** [December 25, 2007, 6:35am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/7 "2007-12-25T06:35:27Z")

</div>

Thanks for the tip.

I ultimately resolved the problems above by getting rid of my macport-  
installed versions, and using the ruby and rails included with  
Leopard.

---

<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:** [December 26, 2007, 5:52am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/8 "2007-12-26T05:52:25Z")

</div>

You can upgrade the gems, sudo gem update. If there is later versions  
available, u will get the latest version. Then u can do sudo gem  
cleanup to uninstall the older versions

Sent from my iPhone

---

<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:** [December 26, 2007, 5:51am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/9 "2007-12-26T05:51:50Z")

</div>

Check the rails version in environment.rb file

Sent from my iPhone

---

<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:** [December 28, 2007, 6:56am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/10 "2007-12-28T06:56:42Z")

</div>

David,

Here is a page you probably want to bookmark for the latest on Ruby on  
Rails on Mac OS X:  
[http://ruby.macosforge.org/](http://ruby.macosforge.org/)

And especially take a look at the FAQ here:  
[http://trac.macosforge.org/projects/ruby/wiki/FAQ](http://trac.macosforge.org/projects/ruby/wiki/FAQ)

Sorry I didn’t see this sooner. It could have saved you a lot of  
headaches.

---

<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:** [December 28, 2007, 7:08am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065/11 "2007-12-28T07:08:58Z")

</div>

David,

Oh also take a closer look at the gem command. There are some pretty  
cool things you can do with it like:

gem outdated =\> will list all the local installed gems that are have  
new versions available

Then it’s just a matter of running:  
sudo gem install some\_gem

The versions of RubyGems \> 0.9.5 even take care of the dependencies  
for you by default.

Another quick tip is that when Rails gets updated you should probably  
install that gem first then a lot of the dependencies of Rails with  
also get installed and should shorten the list of gems listed with  
‘gem outdated’

Just some thoughts. Good luck.

P.S. I’ve been impressed with the support of Rails from Apple so far.  
There was a problem some had before RubyGems 0.9.5+ was released, but  
now that problem no longer exists. There shouldn’t be any reason not  
to use the Apple installed gems and Ruby at this point.
