# Rake error

**URL:** <https://www.ruby-forum.com/t/rake-error/105200>\
**Category:** Rails\
**Created:** [May 27, 2007, 3:17am UTC](https://www.ruby-forum.com/t/rake-error/105200 "2007-05-27T03:17:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [May 27, 2007, 3:17am UTC](https://www.ruby-forum.com/t/rake-error/105200/1 "2007-05-27T03:17:08Z")

</div>

I posted this on Ruby T. but then I realized I probably should of  
posted it here instead…

I receive this error when running a rake command:

$ rake db:migrate  
(in /Users/jeremy/rails/depot)  
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

I’m working with the book “Agile Web D. with Rails” and even  
though it discusses many possible errors, none of them relate to this  
one. Also, my database.yml file seems to be correct so I don’t think  
that’s the problem.

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [May 27, 2007, 5:37am UTC](https://www.ruby-forum.com/t/rake-error/105200/2 "2007-05-27T05:37:20Z")

</div>

On May 26, 9:16 pm, Jeremy H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Referenced from: /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/  
> mysql.bundle  
> Reason: image not found  
> Trace/BPT trap
> 
> I’m working with the book “Agile Web D. with Rails” and even  
> though it discusses many possible errors, none of them relate to this  
> one. Also, my database.yml file seems to be correct so I don’t think  
> that’s the problem.

Well I discovered the diagnoses but not the cure. My “libmysqlclient.  
15.dylib” file is located in “/usr/local/mysql/lib” instead of “/usr/  
local/mysql/lib/mysql”. I opened up the “mysql.bundle” file in vi but  
it was complete chaos. I could see where to make the change but it  
didn’t look safe to edit the file. What do I do?

---

<div class="post-metadata">

**Author:** ![jeremyheiler](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Post date:** [May 27, 2007, 6:37am UTC](https://www.ruby-forum.com/t/rake-error/105200/3 "2007-05-27T06:37:24Z")

</div>

On May 26, 2007, at 11:36 PM, Jeremy H. wrote:

> > dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.
> 
> To post to this group, send email to removed\_email\_address@domain.invalid  
> To unsubscribe from this group, send email to rubyonrails-talk-  
> removed\_email\_address@domain.invalid  
> For more options, visit this group at [http://groups.google.com/](http://groups.google.com/)  
> group/rubyonrails-talk?hl=en  
> -~----------~----~----~----~------~----~------~–~—

I found the answer on Google.  
[http://railsforum.com/viewtopic.php?pid=24070](http://railsforum.com/viewtopic.php?pid=24070)
