1

I just upgraded to Mac OSX Snow Leopard, and recompiled mysql (5.1.39) with the Snow Leopard XCode. I also reinstalled the latest mysql gem.

Now, when running

rake db:migrate

in a rails app, I get

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/local/mysql/lib/libmysqlclient.15.dylib
Referenced from: /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Reason: image not found
Trace/BPT trap

I have /usr/local/mysql/lib/libmysqlclient.16.dylib, but not ...15.dylib.

Do I need to use an earlier version of mysql?

Brian Olpin
  • 87
  • 1
  • 9
  • 1
    A few things to look at: http://stackoverflow.com/questions/1366746/ and http://stackoverflow.com/questions/1357997/ Both have a bunch of links you might follow. Good luck. – Telemachus Nov 05 '09 at 02:50

3 Answers3

1

No it almost looks like you need to remove the mysql gem and then re-install it using gem install mysql -- --with-mysql-dir=/path/to/mysql_dir (sometimes /usr/local/mysql)

markj9
  • 46
  • 1
0

Try hammering in which version of mysql for the gem to use:

gem install mysql -- --with-mysql-config=/path/to/mysql_config

aussiegeek
  • 2,930
  • 3
  • 23
  • 29
0

Thanks for the help!

I ended up removing mysql completely:

http://akrabat.com/2008/09/11/uninstalling-mysql-on-mac-os-x-leopard/

Then compiling and installing the following to /usr/local:

readline 6.0 ruby 1.8.7 rubygems

With help from

http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard

Brian Olpin
  • 87
  • 1
  • 9