Here’s how to get the latest version of MySQL (5.0.51b as of this writing) working with the MySQL/Ruby gem and the Apple-supported version of Ruby that comes with Mac OS X Leopard. These instructions are scattered around the Internets in various places, but I’m sick of searching for them every time I need them so I’m compiling them here in a single place for convenience.
First, download and install MySQL for Mac OS X 10.5 (x86). Don’t install the x86_64 build or Ruby will refuse to speak to it. If you’ve already installed the x86_64 build, backup your databases, install the x86 build on top of it, and restore your databases.
Once you’ve got the correct build of MySQL installed, pop open a terminal and run the following to install the MySQL/Ruby gem:
sudo env ARCHFLAGS="-arch i386" gem install mysql -- \ --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib \ --with-mysql-include=/usr/local/mysql/include
That should do the trick.
Comments
You're a gem
I’ve been looking everywhere for this. Thanks a bunch.
Strange problem
Hi,
I found your page through google and installed the ruby mysql gem on my mac with your line above. Thanks. After installing, I played around with it in irb on a mysql database that I have and it worked find. However when I tried to run a ruby script with it, the “require ‘mysql’” line fails and it doesn’t work:
./msql.rb:4:in `require’: no such file to load — mysql (LoadError)
from ./msql.rb:4
So, when I go back to irb and try to see what happened, irb works fine:
%irb
>> require ‘mysql’
=> true
>>
I’ve tried for a while to track this problem down (maybe it’s a path problem somewhere?)
But, haven’t found anything yet. Google doesn’t seem to be very helpful for this either.
Do you have any pointers? I’m assuming everything works for you. BTW, I’m running
10.5.4 on a 32-bit macbook.
Thanks for any help you can give.
-Jason
The test script from error above was:
#!/usr/bin/ruby
#puts `env`
require ‘mysql’
Re: Strange problem
Try requiring RubyGems first (this is necessary since the mysql lib is a gem):
Thanks
I was just looking back at your page since I got the script to work doing:
require ‘/usr/lib/ruby/user-gems/1.8/gems/mysql-2.7/mysql’
But, your require ‘rubygems’ is much better. I haven’t used gems that much… as
you can probably tell.
Thanks,
-Jason
Me too!
Jason,
Same problem for me. If I don’t specify the absolute path I got the following:
NameError: uninitialized constant Mysql
Changing it to: require ‘/usr/lib/ruby/user-gems/1.8/gems/mysql-2.7/mysql’
Made everything work.
geting mysql.c:2015: error: 'ulong' undeclared
I’m getting the following error when trying to install – any ideas?
Macintosh-2:myequity greg$ sudo env ARCHFLAGS=“-arch i386” gem install mysql — —with-mysql-dir=/usr/local/mysql —with-mysql-lib=/usr/local/mysql/lib —with-mysql-include=/usr/local/mysql/include -V
WARNING: RubyGems 1.2+ index not found for:
RubyGems will revert to legacy indexes degrading performance.
Updating metadata for 69 gems from http://gems.rubyforge.org/
……………………………………………………………
complete
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby extconf.rb install mysql — —with-mysql-dir=/usr/local/mysql —with-mysql-lib=/usr/local/mysql/lib —with-mysql-include=/usr/local/mysql/include -V
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… yes
checking for mysql_ssl_set()… yes
checking for mysql.h… yes
creating Makefile
make
/usr/bin/gcc-4.0 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin9.3.0 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H -I/usr/local/mysql/include -I/usr/local/mysql/include -I/opt/local/include -fno-common -O2 -fno-common -pipe -fno-common -c mysql.c
mysql.c: In function ‘Init_mysql’:
mysql.c:2015: error: ‘ulong’ undeclared (first use in this function)
mysql.c:2015: error: (Each undeclared identifier is reported only once
mysql.c:2015: error: for each function it appears in.)
mysql.c:2015: error: syntax error before numeric constant
mysql.c:2018: error: syntax error before numeric constant
make: * [mysql.o] Error 1
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
Macintosh-2:myequity greg$
worked for me.
Thanks. I’d been ignoring the problem and using the default Ruby-based MySQL drivers until I saw they were going to be removed from Rails 2.2, this worked.
Thanks!
Thanks for posting this!
thanks for your help
sudo env ARCHFLAGS=“-arch i386” gem install mysql — \
—with-mysql-dir=/usr/local/mysql —with-mysql-lib=/usr/local/mysql/lib \
—with-mysql-include=/usr/local/mysql/include
without success, but everything was fine after adding
—with-mysql-config=/usr/local/mysql/bin/mysql_config
hoping that it could help someone
Thanks
Thank you very much for your help. Worked as expected!
Thanks
I really appreciate this as I’m tired of these errors!
worked perfectly
Top man : worked first go !
what am I doing wrong here
sudo env ARCHFLAGS=“-arch i386” gem install mysql — \
> —with-mysql-dir=/usr/local/mysql —with-mysql-lib=/usr/local/mysql/lib \
> —with-mysql-include=/usr/local/mysql/include
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 install mysql — —with-mysql-dir=/usr/local/mysql —with-mysql-lib=/usr/local/mysql/lib —with-mysql-include=/usr/local/mysql/include
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
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
—with-opt-dir
—without-opt-dir
—with-opt-include
—without-opt-include=${opt-dir}/include
—with-opt-lib
—without-opt-lib=${opt-dir}/lib
—with-make-prog
—without-make-prog
—srcdir=.
—curdir
—ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
—with-mysql-config
—without-mysql-config
—with-mysql-dir
—with-mysql-include=${mysql-dir}/include
—with-mysql-lib=${mysql-dir}/lib
—with-mysqlclientlib
—without-mysqlclientlib
—with-mlib
—without-mlib
—with-mysqlclientlib
—without-mysqlclientlib
—with-zlib
—without-zlib
—with-mysqlclientlib
—without-mysqlclientlib
—with-socketlib
—without-socketlib
—with-mysqlclientlib
—without-mysqlclientlib
—with-nsllib
—without-nsllib
—with-mysqlclientlib
—without-mysqlclientlib
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out
Chinook1:~ marccantwell$
You are a rocking google god.
I downloaded the mysql version of mysql(duh…) like 5 months ago.
i was scared your tutorial wouldn’t work. BUT IT DOES. you are the man!!!
the pure Ruby MySQL interface might be easier
You might want to consider installing the pure Ruby MySQL interface from here:
http://www.tmtm.org/en/ruby/mysql/
It’s (at least to me) easier than re-installing mysql.
Simply install the latest version of rails. Download and install the Ruby MySQL interface and your good to go.
Super
thanks man. this is the only working solution that i could find among many purported ones which did not work. it must have been the 86_64 issue
Any ideas how to install the new MySQL-gem without compiling on Mac OS X?
Working on a tiny machine and requiring I18N Rails 2.2 would be a big plus. I am currently on 2.1.2, using the ruby MySQL adpater. Any ideas how to install the shiny new MySQL adapter without first installing 3+GB of Xcode and a few MBs of MySql to compile a tiny adapter? Anything to copy over from a Mac that has that stuff installed?
Thanks,
Tom
Thank you!
Thank you! After many hours of searching this fixed my problem.
Thanks a lot!
Thanks a lot for pointing this out. Now I can use Rails 2.2.2. ;-)
Life saver!
Yeah after 6hours of trying different things and googling, I eventually came across your article. Sorted out everthing for me, thanks very much! :)
Thanks
Thanks a lot for this… Took me quite a lot of searching to reach here
mysql_config also works
This did the job pretty well for me, of cpurse i had to install xcode tools 3 before that
#gem install mysql — —with-mysql-config=/usr/local/mysql/bin/mysql_config
Great!
Thanks a lot—I googled and tried a lot after upgrading to Rails 2.2, this finally worked :-)
This worked with x86_64 version
I did the following command, which worked:
sudo gem install mysql — —with-mysql-include=/usr/local/mysql/include —with-mysql-lib=/usr/local/mysql/lib —with-mysql-config=/usr/local/mysql/bin/mysql_config
Adapted from http://www.napcsweb.com/blog/2007/06/01/mysql-gem-on-osx/
Sorry, it didn't work
It’s more complicated. Still working on the solution.
Thanks Michel.
Adding —with-mysql-config=/usr/local/mysql/bin/mysql_config and it finally installed.
Worked with MySQL 5.0.67
I just ran the command with my default MySQL version 5.0.67, and it “Successfully installed mysql-2.7”. I’m using Leopard 10.5.6. Thanks.
To figure out which MySQL you have...
I wasn’t sure what I installed, but my symlink from /usr/local/mysql explained it all:
Thanks!
- Andy
thanks!
Awesome, worked perfectly and saved me a bunch of time. thx!
Thanks a lot!
I came across this while trying to upgrade to rails 2.2 and this worked on the first try. Thanks for saving me a lot of time!
Running MacPorts
Running Apache2 from MacPorts and MySQL5.0.67 (x86), I had to run the following to get the install going:
Awesome thanks!
I’ve been killing myself looking for this. Worked like a charm!
I second the vote for pure Ruby lib
As mentioned by Kristoph (thank you Kristoph!!!), the pure ruby interface can be found here:
http://www.tmtm.org/en/ruby/mysql/
(This is actually from the author of the ruby mysql gem, so you know you’re getting the right thing here).
This was SUPER easy to install. One thing to note though, the install instructions show:
But they should probably read:
Otherwise the install script won’t have permission to write in the directory it’s trying to write to. Or at least, it didn’t on my machine…
I’m using XAMPP, and I suspect that this is the only way to use the XAMPP mysql with RoR.
Cheers!
-Steve
Finally - mysql is in
Thanks for the post.
To make this work though, I had to kill default ruby installation and reinstall it from source,
if interested I used this link http://blog.bogojoker.com/2008/06/installing-ruby-187-on-mac-os-x-1053 in case if you will have problems with readline.
thanks man!
worked on the first go!
MacPorts MySQL 5
In order for my install to work when installing MySQL 5 from MacPorts was to use the following line:
sudo env ARCHFLAGS=“-arch i386” gem install mysql — —with-mysql-dir=/opt/loc al —with-mysql-lib=/opt/loc al/lib/mysql5/mysql —with-mysql-include=/opt /local/include/mysql5/mysql
Happy February 20th
Much obliged to you for sharing the delightfully concise solution!
Ruby on Rails
For those using Ruby on Rails, I just saw that there is a comment regarding this in database.sample.yml (in the config directory).
Thanks!
Thanks a lot, copy/paste and it worked instantly.
A modified version that worked for me (Mac OS X 10.5.6, mysql5 v14.12, MacPorts)
I had different folders for MySQL:
mysql root:
/opt/local/lib/mysql5lib:
/opt/local/lib/mysql5/mysqlinclude:
/opt/local/include/mysql5/mysq lSo I had to change the statement accordingly:
Thanks
That solved it for me too! Thanks so much!
Thanks!
Worked great on a fresh install of leopard.
Thanks
Worked perfect on fresh install of Leopard
Thanks
dude you are a god.
Worked PErfect!!!
YOU ARE THE MAN!!!!!!
Thanks
This:
sudo gem install mysql — —with-mysql-config=/usr/ local/mysql/bin/mysql_config
works to me well, too!
Thank you
That saved me some time!
This works if you have MAMP installed
sudo env ARCHFLAGS=“-arch i386” gem install mysql — —with-mysql-config=/Appl ications/MAMP/Library/bin/mysq l_config
Was about to kick the mac to the curb!
THANK YOU! this works wonderfully!
Genius
Genius! Thank you very much.
one line gem mysql
Fixed my problems.
Gem install for Ruby Enterprise Edition
for Ruby EE I did 90421/bin/gem install mysql — —with-mysql-config=/opt/ local/bin/mysql_config5
sudo /opt/ruby-enterprise-1.8.6-200
(make sure you substitute the version number for the correct one on your system, ie this bit → ruby-enterprise-1.8.6-20090421 )
Very Useful
Thanks dude, mate or whatever. :B
Awesome
Mate many thanx for that very useful post, I was trying every bloody combination till I found that page!
You Rock bro KEEP ER LIT!!!!
Thanks a lot!
Thanks, that’s exactly what I was looking for.
Excellent - thanks!
Worked perfectly.
Thank you!
You are the man.
Thank you
Thanks!
Different paths needed for MacPorts install
If you’re having trouble getting this to work after installing MySQL with MacPorts, check out this page here:
http://codeintensity.blogspot. com/2007/09/installing-ruby-my sql-gem-with-macports.html
After some searching, this finally worked for me…
Help with PowerPC mac...
Tried all the install options listed above -
Have upgraded to MYSQL 5.0.83 for PPC running rails 2.3 and keep getting this error
env: i386”: No such file or directory
if i do a straight gem install MYSQL
i get this ERROR: Failed to build gem native extension.
Is it the hard fact that I need to upgrade my very old computer?
Thanks! Worked for MacPorts Ruby 1.8.7, too
Saved the day, and it also worked for MacPorts ruby.
Thanks!
Awesome, worked perfectly. Thank you!
Thank You!!!
You’re the best!
SWEET!
Thanks!
error when installing mysql gem
Ive tried almost everything.
Igot latest mysql up, but damn gam wont install.
Help me please !
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Rub y.framework/Versions/1.8/usr/b in/ruby extconf.rb —with-mysql-dir=/usr/loc al/mysql —with-mysql-lib=/usr/loc al/mysql/lib —with-mysql-include=/usr /local/mysql/include
can’t find header files for ruby.
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/my sql-2.7 for inspection. sql-2.7/gem_make.out
Results logged to /Library/Ruby/Gems/1.8/gems/my
Receiving Authentication Error
I have installed all apps properly as far as I’m concerned, but seems can’t troubleshoot this one. Keeping receiving authentication error.
“Status: 500 Internal Server Error
Client does not support authentication protocol requested by server; consider upgrading MySQL client”
Anyone know a workaround to this? Would be highly appreciated.
Different MYSQL location
On my new Mac Pro the Mysql files were not in the same location, so I needed to use: /local/include/mysql5/mysql —with-mysql-config=/opt/ local/bin/mysql_config5
sudo gem install mysql — —with-mysql-include=/opt
I’m running 10.5, but it was copied over from a machine that was running 10.5, but upgraded from 10.4.
can’t find header files for ruby
this solution worked great on my MBP, but its not working on my new Mac Pro nehalem 2.93.
I’ve tried this every which way.
I entered:
sudo env ARCHFLAGS=“-arch i386” gem install mysql — —with-mysql-dir=/usr/loc al/mysql —with-mysql-lib=/usr/loc al/mysql/lib —with-mysql-include=/usr /local/mysql/include —with-mysql-config=/usr/ local/mysql/bin/mysql_config
I keep getting:
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Rub y.framework/Versions/1.8/usr/b in/ruby extconf.rb —with-mysql-dir=/usr/loc al/mysql —with-mysql-lib=/usr/loc al/mysql/lib —with-mysql-include=/usr /local/mysql/include —with-mysql-config=/usr/ local/mysql/bin/mysql_config
can’t find header files for ruby.
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/my sql-2.7 for inspection. sql-2.7/gem_make.out
Results logged to /Library/Ruby/Gems/1.8/gems/my
Thank you
Thank you soo much.. it worked fine………. thank you !!!!!
Snow Leopard with 64-bit MySQL support
This worked well for me on Snow Leopard using 64-bit MySQL:
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-dir=/usr/local/my sql --with-mysql-lib=/usr/local/my sql/lib --with-mysql-include=/usr/loca l/mysql/includeIt’s not necessary to install 32-bit MySQL. You just have to explicitly set
-arch x86_64to tell the compiler to use 64-bit compilation and linking instead.Snow Leopard: How?
@Michael Goff: I tried your way on Snow Leopard and i still get the same error. It seems like no matter what I do, I get the error. Did you do anything special? Did you compile MySQL yourself? What version of MySQL did you install? Do you have to have mysql in your PATH?
snow leopard
found good instructions here http://www.icoretech.org/2009/ 08/install-mysql-and-mysql-rub y-gem-on-snow-leopard-64-bit/
XAMPP on OSX Snow Leopard
I also had issues as I was using XAMPP and “gem install mysql” was complaining about missing mysql.h
I had to upgrade my XAMPP and additionally download the XAMPP developer tools. s/xampp/files/ and downloaded:
Go to http://sourceforge.net/project
xampp-macosx-1.7.2a.dmg
xampp-macosx-1.7.2a-dev.dmg
Of course first I had to remove/backup my existing XAMPP folder under /Applications/xampp
Then I installed the new version and after that the xampp-macosx-1.7.2a-dev.dmg developer pack.
this xampp-macosx-1.7.2a-dev.dmg contains the mysql.h header files and so on.
After that dev tools installation the XAMPP folder has a new folder called “include” which has all the mysql header files like mysql.h
Then the following command line worked for me:
sudo ARCHFLAGS=“-arch i386” gem install mysql — —with-mysql-dir=/Applica tions/XAMPP/xamppfiles/
Note I was pointing to the xamppfiles base-dir as the mysql-dir, because then all the paths are relative as if this would be the mysql root dir.
Snow Leopard 10.5
OK.
So I tried for about 2 hours to get mysql gem working. Here is the issue. I installed mysql 5.0 using a DMG file, so source. Updated ruby and gems and rails. All are up to date. So I tried the above solutions without any luck. What is the issue? Anyone do it the way I did it?
Here are the errors.
sudo env ARCHFLAGS=“-arch i386” gem install mysql — —with-mysql-dir=/usr/loc al/mysql-5.0.86-osx10.5-x86 —with-mysql-lib=/usr/loc al/mysql-5.0.86-osx10.5-x86/li b —with-mysql-include=/usr /local/mysql-5.0.86-osx10.5-x8 6/include —with-mysql-config=/usr/ local/mysql-5.0.86-osx10.5-x86 /include
Even tried using just mysql instead of the 5.0…
/System/Library/Frameworks/Rub y.framework/Versions/1.8/usr/b in/ruby extconf.rb —with-mysql-dir=/usr/loc al/mysql-5.0.86-osx10.5-x86 —with-mysql-lib=/usr/loc al/mysql-5.0.86-osx10.5-x86/li b —with-mysql-include=/usr /local/mysql-5.0.86-osx10.5-x8 6/include —with-mysql-config=/usr/ local/mysql-5.0.86-osx10.5-x86 /include y.framework/Versions/1.8/usr/l ib/ruby/ruby.h
mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Rub
Any help would be great.
Fix?
For anyone that searches high and low. The fix for me was to install XCode from the Snow Leopard disk.
Installing XCode on Snow Leopard fixed it
Yeah, installing XCode fixed it for me too!
XCode Installation Doesn't Seem to Help :( OSX Snow Leopard Server
hey guys, tried every possible permutation of the install scripts to get this thing running with no joy sadly.
Server is running (default config) MYSQL 5.0.82 and database is located in /var/mysql, config lives here, /usr/bin/mysql_config
I just can’t seem to win. Endless “Could not create Makefile” problems.. doing my head in :(
Sqlite Error while Instaling
Hi Guys,
The following is the error i get while am installing sqlite. Can u guys help me
C:\>gem install sqlite3-ruby -v 1.2.3
Building native extensions. This could take a while…
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for fdatasync() in -lrt… no
checking for sqlite3.h… no
make
‘make’ is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems /sqlite3-ruby-1 /sqlite3-ruby-1.2.3-x86-mingw3 2/
.2.3-x86-mingw32 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems
ext/sqlite3_api/gem_make.out
Ruby Mysql Errors
Can u guys help me, mysql not installing
C:\>gem install mysql
Successfully installed mysql-2.8.1-x86-mingw32
1 gem installed
Installing ri documentation for mysql-2.8.1-x86-mi
No definition for next_result
No definition for field_name
No definition for field_table
No definition for field_def
No definition for field_type
No definition for field_length
No definition for field_max_length
No definition for field_flags
Thanks!
It works perfectly fine!
Thanks a lot!
Snow Leopard Server here too, no dice.
Same as Robert Lincolne, I’m on Snow Leopard Server, which has MySQL installed out of the box, but can’t seem to find the right combination of flags to make this work. And yes, I have all the development tools installed.
Snow Leopard Server - solution
OK, I figured it out. For the benefit of others, you need to get this:
http://www.opensource.apple.co m/other/MySQL-49.binaries.tar. gz
And unpack it to the root of your main volume. Basically the libraries are missing from Mac OS even though it includes the server and the client out of the box (…why, Apple?…) This restores the missing files, and then the default gem command worked for me.
Kept getting errors until I updated rubygems
I was finally able to get mysql gem installed using the commands above, after I did:
sudo gem update —system
Fix for most of these problems
Simply add /usr/local/mysql/bin to your path or whatever the /path/to/mysql/bin is… on mac, this is usually your .profile file in your home directory. On mac, I recommend having mac ports installed if you have any missing unix tools that are necessary. Also any “No definition for”… statements that show up after the gem is already installed have to do with the documentation and shouldn’t be of any concern.
On Snow Leopard with MAMP
The following worked for me:
sudo env ARCHFLAGS=“-arch x86_64” gem install mysql — —with-mysql-config=/Applicat ions/MAMP/Library/bin/mysql_co nfig
Only after I corrected mysql_config provided with MAMP
Made use of the following tutorial to include mysql headers and library.
doesn't work for me............. Need help
I have the same problem, please help
sudo env ARCHFLAGS=“-arch i386” gem install mysql — \ ysql —with-mysql-lib=/usr/local/m ysql/lib \ al/mysql/include
> —with-mysql-dir=/usr/local/m
> —with-mysql-include=/usr/loc
Building native extensions. This could take a while…
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Rub y.framework/Versions/1.8/usr/b in/ruby extconf.rb —with-mysql-dir=/usr/local/m ysql —with-mysql-lib=/usr/local/m ysql/lib —with-mysql-include=/usr/loc al/mysql/include y.framework/Versions/1.8/usr/l ib/ruby/ruby.h
mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Rub
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/my sql-2.8.1 for inspection. sql-2.8.1/ext/mysql_api/gem_ma ke.out
Results logged to /Library/Ruby/Gems/1.8/gems/my
Another vote for the pure Ruby MySQL interface
You can keep your 64 bit MySQL if you install ruby-mysql (the pure Ruby mysql gem)!
It is no longer at tmtm.org, but instead on github now:
http://github.com/tmtm/ruby-my sql
Message to Moises
Moises, have you figured out why it doesn’t work. I have the same error that you do. I’m on Mac OS X Server. I’ve tried everything with no avail whatsoever. I have to admit I’m new to ruby and MySQL.
Some Developer Somewhere
I tried all the above solutions and also “sudo gem install mysql — –with-mysql-include=/usr/loc al/mysql/include –with-mysql-lib=/usr/local/m ysql/lib –with-mysql config=/usr/local/mysql/bin/my sql_config”
but got the same error, I’m running Mac 10.6.3. Any Suggestions?
Thanks
shorter command line that works on Snow Leopard
sudo gem install mysql — —with-mysql-config=/usr/loca l/mysql/bin/mysql_config
THANKS!
it works! been looking for this one. thank you. =)