# Again and again: no such file to load -- mysql

**URL:** <https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627>\
**Category:** Rails\
**Created:** [February 18, 2009, 9:19am UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627 "2009-02-18T09:19:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaqwery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@zaqwery](https://www.ruby-forum.com/u/zaqwery)\
**Post date:** [February 18, 2009, 9:19am UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627/1 "2009-02-18T09:19:50Z")

</div>

Hello!  
I’ve got same problem! Can’t continue working with Rails!  
I have OSX 10.5.6. Mysql 5.0.67, Latest Ruby , Rubygems, Rails 2.2.2,  
and mysl gem 2.7 installed in this way  
sudo env ARCHFLAGS="-arch i386" gem install mysql – --with-mysql-  
dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-  
mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/  
mysql/bin/mysql\_config

when I do rake db:migrate

!! The bundled mysql.rb driver has been removed from Rails 2.2. Please  
install the mysql gem and try again: gem install mysql.  
rake aborted!  
no such file to load – mysql

I’ve been googling for 3 days and none of the solutions work for me.  
I’ve reinstalled mysql ,ruby and rails several times… got same  
error. Please help!  
Thanks beforehand

---

<div class="post-metadata">

**Author:** ![zaqwery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@zaqwery](https://www.ruby-forum.com/u/zaqwery)\
**Post date:** [February 18, 2009, 11:31am UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627/2 "2009-02-18T11:31:58Z")

</div>

Have you ensured whether your mysql services are running

Regards,  
Vimal

---

<div class="post-metadata">

**Author:** ![zaqwery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@zaqwery](https://www.ruby-forum.com/u/zaqwery)\
**Post date:** [February 18, 2009, 11:51am UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627/3 "2009-02-18T11:51:24Z")

</div>

Sure, mysql starts at startup, there is a mysql task in Activity  
Monitor, so mysql works, I can create and drop databases. I guess it’s  
different problem, something wrong with mysql.rb driver, although  
mysql 2.7 gem installed successfuly…

---

<div class="post-metadata">

**Author:** ![zaqwery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@zaqwery](https://www.ruby-forum.com/u/zaqwery)\
**Post date:** [February 18, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627/4 "2009-02-18T22:15:10Z")

</div>

Try this:

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

---

<div class="post-metadata">

**Author:** ![zaqwery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@zaqwery](https://www.ruby-forum.com/u/zaqwery)\
**Post date:** [February 18, 2009, 11:14pm UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627/5 "2009-02-18T23:14:58Z")

</div>

I have already tried this , the one for Leopard (I have 10.5.6)  
Today i reinstalled ruby ,rubygems, rails, mysql gem… it gives me  
same error all the way!!!

!!! The bundled mysql.rb driver has been removed from Rails 2.2.  
Please  
install the mysql gem and try again: gem install mysql.  
rake aborted!  
no such file to load – mysql

I don’t know what to do… Perhaps formating harddrive to non case-  
sensitive filesystem, and reinstalling entire system is the last I can  
do… I tried many ways…  
Didn’t you, guys having Leopard, encounter this problem with  
mysql.rb??? did you? Windows users have solution fixing this bug with  
some .dll, why Mac users don’t have it?

Who had the same please assist! plsssss

---

<div class="post-metadata">

**Author:** ![zaqwery](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/cdc98d/32.png) [@zaqwery](https://www.ruby-forum.com/u/zaqwery)\
**Post date:** [February 18, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/again-and-again-no-such-file-to-load-mysql/160627/6 "2009-02-18T23:16:45Z")

</div>

UPDATE:  
I tried to install mysql gem in this way:

sudo env ARCHFLAGS="-arch i386" gem install mysql – --with-mysql-  
dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-  
mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/  
mysql/bin/mysql\_config --include-dependencies

and the error has gone somehow… Could “–include-dependencies” make  
this?
