Mac installation
CS290F Fall 2006 - UCSB Computer Science - Thorsten von Eicken
Ruby comes pre-installed on OS X machines; rumor has it, however, that the version of ruby that is installed is broken and will not run rails properly. Consequently, we recommend installing an alternate version of ruby first. If you are using the darwin ports or fink package management systems for OS X, then you can use those to install Ruby and PostgreSQL or MySQL. The following installation procedures are mostly untested, and are my best guess at the commands that should work. If you try them and they don't work, let me know so I can change this page.
# ports installation... sudo port install ruby sudo port install mysql5 rb-mysql5 # for MySQL sudo port install postgresql81-server # for PostgreSQL # fink installation... sudo fink install ruby18 sudo fink install mysql-client mysql15-dev mysql15-shlibs # for MySQL sudo fink install postgresql80-unified postgresql80-unified-dev postgresql80-unified-shlibs
Unfortunately, whichever system you use, further tweaking is required to get the databases running properly. Stefan can assist you with this if you need help.
If you are using fink, then there is no package for RubyGems (the Ruby package management system), but under darwin ports, the rb-rubygems package provides this. Either way, RubyGems can be installed from source [1]. The following code should install it:
wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz tar zxvf rubygems-0.9.0.tgz cd rubygems-0.9.0 ruby setup.rb install
Once you have Ruby, RubyGems, and a database installed, you can use the gem command to install Rails. This is extremely simple:
gem install -r rails
External Resources
Here's an article describing how to install various Rails-related software on a mac.
