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.
> 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?
> On Nov 14, 7:37 pm, jnunemaker <nunema...@gmail.com> wrote:
>> I'm on mac osx tiger if that helps. Forgot to put that in the
>> message.
>> On Nov 14, 8:31 pm, jnunemaker <nunema...@gmail.com> wrote:
>>> 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?