It took a while to get it working, but I finally managed to install Ruby on Rails and then Tracks, a RoR web application for GtD on my PowerBook.
Some hints for getting it working on Tiger:
- I used a MySQL 4.1 installer from here – my version is
mysql Ver 14.7 Distrib 4.1.10, for apple-darwin8.2.0 (powerpc)
- I used the Ruby on Rails for Tiger installer at this page. I also needed to follow the instructions at the bottom of the page to install the “mysql” gem, which is not part of the aforementioned RoR installer. Specifically, I did:
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
Note that if you don’t supply
--with-mysql-dir
, the install of the mysql gem is likely to fail withERROR: While executing gem … (RuntimeError) ERROR: Failed to build gem native extension
. That’s what happened to me at least on Mac OS X Tiger. Interestingly, I was able to install the mysql gem without that option on a FreeBSD server – I don’t know why. - I used ruby-1.8.2 (comes with Tiger), rails-0.13.1, redcloth-3.0.3, and mysql-2.6. Use the
gem list
command to see what you have andsudo gem update
to update. - I used Tracks 1.03, which I got from here. I unzipped the file in $HOME/Sites
- I followed the Tracks install instructions in
doc/README_FOR_APP
for copying theconfig/{database,settings}.yml.tmpl
files toconfig/{database,settings}.yml
, creating a “tracks” database in mysql and populating it with data using the sql scripts in thedb
directory. - I fired up the WEBrick server by running this from the “tracks” root directory:
ruby script/server --environment=production
- Then I went to http://0.0.0.0:3000/signup and created my account and now tracks is available at http://0.0.0.0:3000/ — this is with WEBrick — I haven’t attempted to mess with Apache and FastCGI yet. I’ll save that for another day.
I finally finally finally got this to work. The step in a comment at http://wiki.rubyonrails.com/rails/show/HowtoInstallOnOSXTiger which made the difference for me was to change my gcc version to 3.3 by doing sudo gcc_select 3.3. Once I did that, and reinstalled mysql with the mysql-dir= thingie, it worked like a charm.
Glad you managed to get it installed! MySQL can be a bit of a beast to get running. Remember that on Tiger you have the option of using SQLite3 databases, which is much easier: small, fast, portable, and you don’t need to start a daemon to get the database running.