Bad do_mysql-0.2.2 Gem 4
If your getting this error whilst attempting to load up DataMapper in Merb (the rake dm:install:mysql portion, or just gem install do_mysql). Here’s how I fixed it…
Started merb_init.rb ...
Loading dependencies...
dyld: NSLinkModule() error
dyld: Library not loaded: /opt/local/lib/mysql5/mysql/libmysqlclient_r.15.dylib
Referenced from: /usr/local/lib/ruby/gems/1.8/gems/do_mysql-0.2.2/lib/mysql_c.bundle
Reason: image not found
Trace/BPT trapTry this…
# sudo -s
# cd /usr/local/lib/ruby/gems/1.8/gems/do_mysql-0.2.2/ext
# make clean
# vim mysql_c.i
[change any bad paths to correct mysql locations in your OS]
# make all
# rm ../lib/mysql_c.bundle
# cp mysql_c.bundle ../libDataMapper with MySQL should now work in Merb! Happy hacking once more…
Comments
-
Thx! Was banging my head against the wall for a while on this one.
-
Thank you so much for posting this. I can finally start playing around with DataMapper!
-
That didn't specifically work for me, but sent me on the right path. On OSX (10.5), it couldn't locate my copy of mysql_config in /usr/local. I ended up modifying the ext/extconf.rb file to point to a correct path for mysql_config by replacing line 15 with location = "path/mysql_config". After that, I just ran a rake install in the do_mysql directory and now it's golden.
-
Thanks! Worked perfectly for me.
