iCoreTech Research Labs Just a placeholder

23Nov/0910

Installing MySQL Ruby Gem in Snow Leopard Server

Snow Leopard Server doesn't come with MySQL client and library files.
In order to get them we need to download a package, for Snow Leopard Server 10.6.2:
http://www.opensource.apple.com/other/MySQL-49.binaries.tar.gz (71.2MB)

The main entry page should be http://www.opensource.apple.com/release/mac-os-x-1062/ but I cannot find the package there, getting the url was guess work from reading an Apple support page: http://support.apple.com/kb/TA25017

What we are doing is to uncompress a archive directly in our root.
Once you get the file you should decompress it unless your browser already did for you.
Since Safari did it for me I'm having MySQL-49.binaries.tar in my Downloads folder.

Open up a terminal.

cd Downloads
sudo tar -xvf MySQL-49.binaries.tar -C / # use -zxvf if you still have the .tar.gz file

We should have the required libraries in order to install the MySQL Ruby Gem.

You may have already read the previous articles about MySQL and Ruby, however the procedure is different:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql

This should give you a working installation of MySQL Gem.

Related posts:

  1. Install MySQL and MySQL Ruby gem on Snow Leopard, 64 bit
  2. CentOS “gem install mysql” problems, solution
  3. Snow Leopard server FAQs, part 1
  4. Hosting Git repositories through WebDAV on Snow Leopard Server
  5. Snow Leopard server wallpaper

Comments (10) Trackbacks (5)
  1. Thanks, i was looking for a solution since yesterday and find yours…. Great….

  2. Just one question, do you know why Apple don’t distribute officially this binaries. It’ll be more easy for every body ?

  3. I don’t know. My guess is that they don’t have up to date documentation on the matter.

  4. Did not work on my new Mac Mini Server. I get the following:

    server:~ hostadmin$ sudo env ARCHFLAGS=”-arch x86_64″ gem install mysql
    Password:
    Building native extensions. This could take a while…
    ERROR: Error installing mysql:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
    mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

    Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection.
    Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

    Any ideas on what I’m doing wrong?

  5. Diamonds and Rubys are my favorite gemstones, i like the color red and the sparkle of diamond.*.`

  6. For Snow Leopard 10.6.4 Server, the version of MySQL changed to 5.0.88, and the resultant new binary tarball is: http://www.opensource.apple.com/other/MySQL-53.binaries.tar.gz . Everything else is the same


Leave a comment


Additional comments powered by BackType