* * *
Having lots of time to waste
Anyway, I reasoned that the installation problems I encountered in Tiger were a result of Apple's outdated installation of MySQL and Apache. This time, I felt that the Snow Leopard team may have been thoughtful enough to resolve the old issues from Tiger days.
So I happily followed the steps outlined in http://rubyonrails.org/. Things worked well. I was able to create a web app in no time (applause) using SQLLite for my database and doing the blog exercise on the the rubyonrails.org website. However, as soon as I tried to shift to MySQL, my headaches started.
I downloaded the latest dmg file of MySQL. I got different errors when I tried to run rake db:create. RoR refused to create the database on MySQL as promised (it worked fine with SQLLite, the database that comes pre-packaged in RoR). The error messages alternated between the inability to create the database and a syntax error on the .yml file.
Googling revealed that the problem was common. Many solutions were proposed. I tried many of them too. Nothing worked. My RoR-guru-friend Kenneth kept bugging me to just use MacPorts. I told him this would be my last resort and gave myself a deadline.
That deadline has passed without any fruitful solution. So I have taken Kenneth's advice and gone on installing MySQL, Ruby, Rails and Gems on MacPorts.
* * *
Errors and solutions:
- Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' - This probably means that MySQL is not running. Start MySQL by typing this on the command line:
sudo /opt/local/share/mysql5/mysql/mysql.server start
Useful links:
- Paul Sturgess's Guide to Installing RoR on Leopard - Found this entry update only after I went through MacPorts. This may be an easier and faster way of installing RoR and MySQL.
- Absolute Moron's Guide to Capistrano - I was always wondering what the fuss on Capistrano was about. This is the simplest introduction I've read about it.
- Get Started on RoR Quickly - RoR is big on action, so the fastest way to start is just to try it. This is a link to the Ruby on Rails Guides.
- Configuring MySQL and PHP in MacPorts - Helpful tips on those topics.
- Insight on the Problem from MacOSX Hints - Found this a bit too late. Some really good insights on the MySQL problem.