I upgraded to Snow Leopard while using disc we've got at WWDC.

Attempting to run a number of my rails applications now gripes about sql

    (in /Customers/coneybeare/Projects/Ambiance/ambiance-server)

!!! The bundled up mysql.rb driver continues to be taken off Rails 2.2. Please install the mysql jewel and check out again: jewel install mysql.

Posting all sounds in /Customers/coneybeare/Projects/Ambiance/ambiance-sounds/Import 32/Compressed/

 -- AdirondackPeepers.caf

!!! The bundled up mysql.rb driver continues to be taken off Rails 2.2. Please install the mysql jewel and check out again: jewel install mysql.

rake aborted!

dlopen(/opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib

  Recommended from: /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle

  Reason: image not found - /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle

(See full trace by running task with --trace)

I possibly could have sworn I fixed this once before. The issue is that

sudo jewel install mysql

doesn't work and provides the mistake:

 Building native extensions.  This may require sometime...

ERROR:  Error setting up mysql:

    ERROR: Unsuccessful to construct jewel native extension.

/opt/local/bin/ruby extconf.rb install mysql

checking for mysql_query() in -lmysqlclient... no

checking for primary() in -lm... yes

checking for mysql_query() in -lmysqlclient... no

checking for primary() in -lz... yes

checking for mysql_query() in -lmysqlclient... no

checking for primary() in -lsocket... no

checking for mysql_query() in -lmysqlclient... no

checking for primary() in -lnsl... no

checking for mysql_query() in -lmysqlclient... no

Jewel files will stay set up in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.

Results drenched to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/jewel_make.out

Has anybody become mysql to utilize rails on snow leopard yet? If that's the case, what's your setup and yet, so what can I actually do to breed it?

I simply went using it . discomfort... some tips about what labored for me personally:

  1. Download / install the 64-bit MySQL 5.1.37 from mysql.com
  2. run the next instructions:

    sudo jewel update --system

    sudo env ARCHFLAGS="-arch x86_64" jewel install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

I additionally uninstalled all mysql gems which were going swimming from my 10.five days, that could get it done when the above does not meet your needs :)

Repairing mysql as 64bit or setting up the 64bit version is essential, however, you should also make certain you build the native areas of the mysql jewel as 64bit too (this does not apply if you're on among the original Apple Core Duo apple computers).

Here's the miracle command:

env ARCHFLAGS="-arch x86_64" jewel install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

You need to set the ARCHFLAGS as proven above if you perform a jewel install with native components on Snow Leopard.

If you are using bundler, you should use "bundle config" to create the correct build arguments for mysql like so:

bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config

I fought against with this particular for any very long time and lastly first got it focusing on Snow Leopard. I wound up setting up Ruby, RubyGems, and MySQL from source (begin to see the Hivelogic tutorial for setting up Ruby and RubyGems. The MySQL tutorial is related at the end). I finally got the jewel to set up, however i was still being getting

dyld: lazy symbol binding unsuccessful: Symbol not found: _mysql_init

  Recommended from: /Library/Ruby/Site/1.8/universal-darwin10./mysql.bundle

  Expected in: flat namespace

dyld: Symbol not found: _mysql_init

  Recommended from: /Library/Ruby/Site/1.8/universal-darwin10./mysql.bundle

  Expected in: flat namespace

Trace/BPT trap

I finally erased the mysql.bundle (I've no clue what to) also it all labored.

sudo rm -f /Library/Ruby/Site/1.8/universal-darwin10./mysql.bundle

Hope that can help someone.