Technology from the trenches

The MySQL ruby gem on Leopard (client)

Friday, February 8th, 2008

rubygems.png I just started getting back into Ruby on Rails, after a hiatus while I battled with Leopard server. I discovered that setting up my Rails development environment in Leopard wasn’t as perfectly straightforward as it was in Tiger.

I installed the binary distribution of MySQL, and proceeded to install the mysql ruby gem to connect to it. First, the build failed because it didn’t know where to look for the mysql client libraries, then it failed again because by default the Makefile tries building for both PPC and Intel architectures.

To make a long story short, the solution is to add an ARCHFLAGS environment variable specifiying your architecture, and to provide the path to mysql_config on the command line. For the former, add:

ARCHFLAGS="-arch i386"

To your /etc/bashrc (assuming you use the default shell, bash), and open a new terminal or run ‘bash’. If you’re on PPC architecture, change “i386″ to “ppc”. Then try the gem again with the path to mysql_config appended, like so:

sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

That is all on one line.

Tags: , , , ,

Tiger to Leopard Server Migration, Part Four

Wednesday, January 30th, 2008

Kerberos and Single Sign-on in Leopard Server

espressosjeemz.jpg It has been awhile since my last post of this series — sorry to keep you waiting. Kerberos on Mac OS X Server is a finicky thing, and it took me this long to get it working! Well, I did take a 3 week vacation, and was busy with other projects for at least 2 weeks … but it was a major pain in the ass to set up, and I’m not yet entirely satisfied.

To get straight to the point, the following procedure got kerberos with single sign-on up and running for me. Hopefully it will work for you too.

(more…)

Tags: , , , , , , , ,

Locked Out of Leopard Server: Fixing the Workgroup Manager Problem

Wednesday, November 21st, 2007

I booted up my Leopard server yesterday to discover that my directory administrator account — that’s the one used to authenticate to /LDAP/127.0.0.1 in Workgroup Manager — appeared to be broken. It looked as if I was locked out, as if I had forgotten my password. I knew that I hadn’t forgotten my password, and I verified that by logging into the directory using ldapsearch. However, Workgroup Manager insisted, “login information not valid for this server”.

I worked on it for awhile, sifting through log files and Googling for answers, but ran out of time for the evening: I was almost late for American Gangster. To my surprise, when I booted up Leopard server today, it worked. To confirm my sanity, I rebooted again: this time, no dice. So there was some kind of random failure happening. After some hunting around, I noticed a single entry in slapd.log:

slapd[40]: SASL [conn=9] Failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Decrypt integrity check failed)

(more…)

Tags: , , ,