Installing Ruby on Rails

From LaurasWiki

I installed Ruby on Rails in order to run Tracks, a GTD task/time/commitment manager developed by but she's a girl... (http://www.rousette.org.uk/) (bsag).

Table of contents

Installing RoR on the OSX with Locomotive (for Tracks)

The Tracks install instructions send you to Jacken’s Blog (http://www.jackenhack.com/blog/archives/2006/05/25/gtd-ruby-on-rails-and-the-mac/) for a tutorial on installing RoR on the OSX using locomotive (http://locomotive.raaum.org/), a self-contained RoR installer package.

I also checked the Locomotive page at Version Tracker (http://www.versiontracker.com/dyn/moreinfo/macosx/28097):

  • The framework: Ruby on Rails
  • The favored webserver: lighttpd with FastCGI
  • An embedded database: SQLite

Download and unpack Locomotive, then copy the entire Locamotive folder to your applications folder. That's it!

It seems a little odd -- I mean, it really is self-contained, lighttpd and SQLite are tucked inside the Locomotive directory; but then, the Plone installer puts Zope inside the Plone folder too. Anyway, it's working fine with Tracks!

Intro: Getting to Ruby on Rails

Well, the link to Locomotive at Jacken’s Blog was dead, and I was feeling frisky, so I made the mistake of trying:

  • HowtoInstallOnOSXTiger (http://wiki.rubyonrails.org/rails/pages/HowtoInstallOnOSXTiger) from the official RoR wiki, which sent me to:
  • Installing Rails on Tiger (http://maczealots.com/tutorials/ruby-on-rails/#comments-post) at MacZealot.

Failed install following MacZealot Tutorial

I checked to see that I had Ruby:

hopelandia:~ latrippi$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]

Then I downloaded RubyGems, unpacked it to the Desktop, and ran:

hopelandia:~/Desktop/rubygems-0.9.0 latrippi$ sudo ruby setup.rb

Then:

hopelandia:~/Desktop/rubygems-0.9.0 latrippi$ sudo gem install rails

I made it through the first error and correction:

hopelandia:~/Desktop/rubygems-0.9.0 latrippi$ sudo gem install sqlite3

Should be:

hopelandia:~/Desktop/rubygems-0.9.0 latrippi$ sudo gem install sqlite3-ruby

And then got:

Building native extensions.  This could take a while...
can't find header files for ruby.
ERROR:  While executing gem ... (RuntimeError)
   ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/ext/sqlite3_api/gem_make.out

I paused, then scanned the comments there and back at the RoR Wiki OSX install page -- and headed back to dig out locomotive.

Now, I've deleted the RubyGems folder from the desktop. I don't know if that's the proper way to clean up, or whether there are other artifacts of the failed install I should be concerned about.


See also

  • WebServerXKit (http://www.rbsoftware.net/?page=wsxk), said to give you everything: Apache, MySQL, PHP, PostGre, and RoR (this version still in beta)