Ruby on Rails on OS X
I was having the worst time getting my Rails applications to work from my Mac G5; they'd work fine from our Linux boxen. I kept getting this error when trying to do "script/generate" from my G5 (running OS X 10.4 Tiger) and connecting to our database server (a Linux box):
Access denied for user ''@'my.domain.name' (using password: NO)
think it may have been that I had an old version of the MySQL libraries and was running into the password-hashing problem. Regardless, I did a clean sweep (although I did leave ruby-gems itself intact, come to think of it) and now everything's copacetic.
- Clobbered Ruby. I wanted to upgrade to 1.8.4 anyway, so I deleted /usr/bin/ruby and /usr/lib/ruby entirely.
- Got rid of Rails: sudo gem uninstall rails.
- New Ruby. I built 1.8.4 from source; note that if you want to overwrite Tiger's default install of Ruby, run configure to tell it so ("./configure --prefix=/usr").
- Installed Lucas Carlson's Complete Fix for Ruby on OS X 10.4 Tiger
- Downloaded and installed MySQL 5.0 for OS X. (Note that when I tried to use the 64-bit version, the mysql gem did not compile.) If you use the binary package, the installer places all the files in /usr/local/mysql-5.0.whatever and makes a symbolic link to it in /usr/local/mysql. Nice behavior, that--uninstalling is as simple as deleting the folder. I love the Mac.
- Installed the mysql gem: sudo gem install mysql --with-mysql-dir=/usr/local/mysql
- Reinstalled Rails: sudo gem install rails --include-dependencies
0 Comments:
Post a Comment
<< Home