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.
$1.99 domains with SSL purchase!
Pingback: Installing MySQL Ruby Gem in Snow Leopard Server « iCoreTech … Mac Ruby
Pingback: I AM OSX » Installing MySQL Ruby Gem in Snow Leopard Server « iCoreTech …
Pingback: Installing MySQL Ruby Gem in Snow Leopard Server « iCoreTech … Mac Apple
Pingback: Installing MySQL Ruby Gem in Snow Leopard Server « iCoreTech … RubyCocoa
Thanks, i was looking for a solution since yesterday and find yours…. Great….
Just one question, do you know why Apple don’t distribute officially this binaries. It’ll be more easy for every body ?
I don’t know. My guess is that they don’t have up to date documentation on the matter.
You’re right …. That’s really strange…..
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?
did you installed Xcode?
you are my hero…. Xcode did the trick. I’m new to the Mac… what did Xcode install do that made mysql gems install work?
Xcode installed the header files for various programming languages. If you don’t install the dev tools on a regular desktop version of OS X, then you’ll get the same thing when trying to install any gem that requires some C libraries to be built.
Pingback: Setting up redmine on a mac server « Energetic Blues
Diamonds and Rubys are my favorite gemstones, i like the color red and the sparkle of diamond.*.`
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
the best gemstones would be diamond and topaz, red rubies are great too;*’
the best and ultimate gemstone is of course diamond because it sparkles and very expensive*:.
gemstones are expensive but when you give a ring with gemstone to your girlfriend, she would really like it -.: