Building the MySQL gem on Leopard with the macports MySQL
Posted by Cliff
I’ve been running with the Rails MySQL adapter for a while now after failing to build the native MySQL gem under Leopard. The problem, I thought, was that I’m using the Macports MySQL, and it turns out I was right. If you attempt to build the MySQL gem and you get an error like this:
Building native extensions. This could take a while...
ERROR: While executing gem ...
(Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
Gem files will remain installed in
/opt/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
Then you’ll need to add a couple of things to your Gem command line to get it building:
If you’re just installing or updating the gem, try this:
sudo gem install mysql -- --with-mysql=/opt/local/lib/mysql5 --with-mysql-lib=/opt/local/lib/mysql5/mysql --with-mysql-include=/opt/local/include/mysql5/mysql
If you’re updating all your gems (this one caught me out), then try this:
sudo gem update -- --with-mysql=/opt/local/lib/mysql5 --with-mysql-lib=/opt/local/lib/mysql5/mysql --with-mysql-include=/opt/local/include/mysql5/mysql
AppFresh Shmapfresh..
Posted by Cliff
Well, AppFresh is a great idea but has many, many issues. Not least that the moderator won’t moderate my criticisms. Free speech anyone? Don’t think I’ll bother with this one..
Edit: Why the outburst? It’s just one of those things that bugs me. It’s like saying something to someone’s face and having them completely blank you. And really, it’s a piece of software not a secret government institution - is moderation really necessary beyond curbing spam?
Bring back the flat dock in Leopard
Posted by Cliff
Ok. Leopard is nice enough, but there are still a few niggles I have with it. One of those is the new dock.. shiny and cute as it is, I still prefer the old one. Fortunately the old (almost) one can be resurrected with these simple steps:
Edit: I’ve updated this article a little after some feedback from a friend of mine. Thanks Calum :-)
First run Terminal and type the following to make the switch:
defaults write com.apple.dock no-glass -boolean YES
Note: if you want to switch back to the shiny 3D dock, change that YES to a NO
Then restart the dock:
killall Dock
Tada!
I don’t know exactly what causes this (I’ve only had a Mac a week!), but upon installing Leopard today and installing a couple of updates, the system felt a little sluggish and so I took a look at my Console, and it was brimming with messages like this:
10/28/07 1:06:33 AM com.apple.launchd[1] (com.apple.dyld)
Throttling respawn: Will start in 59 seconds
10/28/07 1:07:33 AM com.apple.launchd[1] (com.apple.dyld)
Throttling respawn: Will start in 59 seconds
10/28/07 1:08:34 AM com.apple.launchd[1] (com.apple.dyld)
Throttling respawn: Will start in 59 seconds
10/28/07 1:09:35 AM com.apple.launchd[1] (com.apple.dyld)
Throttling respawn: Will start in 59 seconds
10/28/07 1:10:39 AM com.apple.launchd[1] (com.apple.dyld)
Throttling respawn: Will start in 56 seconds
The fix for this is pretty simple, which I found here. But in brief, all you have to do is type this in a Terminal:
sudo update_prebinding -force -root /
Then reboot, and that should fix it :-)





