installation issues

6 views
Skip to first unread message

jnunemaker

unread,
Nov 14, 2007, 8:31:38 PM11/14/07
to DataMapper
So I sudo gem install'd data mapper. cd'd into the gem dir and did a
sudo rake dm:install:mysql. I got no complaints (or any output of any
kind).

When I try to setup a database connection I get the following error:

$ irb
>> require 'data_mapper'
=> true
>> DataMapper::Database.setup({:adapter => 'mysql', :host => 'localhost',:username => 'root',:database => 'weight_watchers_development', :password => ''})
dyld: NSLinkModule() error
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient_r.
15.dylib
Referenced from: /opt/local/lib/ruby/site_ruby/1.8/i686-darwin8.10.1/
mysql_c.bundle
Reason: image not found
Trace/BPT trap

Any ideas what is going on?

jnunemaker

unread,
Nov 14, 2007, 8:37:31 PM11/14/07
to DataMapper
I'm on mac osx tiger if that helps. Forgot to put that in the message.

Sam Smoot

unread,
Nov 15, 2007, 1:02:03 AM11/15/07
to DataMapper
jnunemaker, maybe this post will help?
http://groups.google.com/group/datamapper/browse_thread/thread/b03963bf05a7ae60/b9d71f1f8e9dd020?lnk=gst&q=nslinkmodule#b9d71f1f8e9dd020

It's a different gem, but seems to be a similar cause...

There's another solution:

Mysql NSLinkModule error

// If you get an error like this:

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/local/mysql/lib/mysql/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

// You solve it like this:

sudo mkdir /usr/local/mysql/lib/mysql
cd /usr/local/mysql/lib/mysql
sudo ln -s /usr/local/mysql/lib/*.dylib .

Let me know if either of these helps?

John Nunemaker

unread,
Nov 16, 2007, 9:54:08 PM11/16/07
to datam...@googlegroups.com
The sudo/cd/sudo worked. Thanks Sam. I've been dying to try
datamapper but haven't had the time to figure out what was wrong.
Reply all
Reply to author
Forward
0 new messages