# Mysql gem recognized by script/server but not rake

**URL:** <https://www.ruby-forum.com/t/mysql-gem-recognized-by-script-server-but-not-rake/191074>\
**Category:** Rails\
**Created:** [July 4, 2010, 12:04pm UTC](https://www.ruby-forum.com/t/mysql-gem-recognized-by-script-server-but-not-rake/191074 "2010-07-04T12:04:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [July 4, 2010, 12:04pm UTC](https://www.ruby-forum.com/t/mysql-gem-recognized-by-script-server-but-not-rake/191074/1 "2010-07-04T12:04:36Z")

</div>

Hi all,

I recently installed the ruby mysql gem (2.8.1) on my Mac Leopard  
after much trouble ([http://groups.google.com/group/rubyonrails-talk/](http://groups.google.com/group/rubyonrails-talk/)  
browse\_thread/thread/586c29ca813cd391/fb5f34c8f9eb9e3f?lnk=gst&q=mysql  
+gem#fb5f34c8f9eb9e3f)

Now, when I start up the Rails 2.3.5 application using script/server,  
it connects to the database just fine. But when I run 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  
/Library/Ruby/Site/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’  
/Users/ram/.gem/ruby/1.8/gems/activesupport-2.3.5/lib/active\_support/  
dependencies.rb:156:in `require’  
…

Anybody got any idea why this is happening and how I can fix it?

Thanks!

---

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [July 4, 2010, 7:04pm UTC](https://www.ruby-forum.com/t/mysql-gem-recognized-by-script-server-but-not-rake/191074/2 "2010-07-04T19:04:14Z")

</div>

On Jul 4, 11:03 am, Ram [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all,
> 
> I recently installed the ruby mysql gem (2.8.1) on my Mac Leopard  
> after much trouble ([http://groups.google.com/group/rubyonrails-talk/](http://groups.google.com/group/rubyonrails-talk/)  
> browse\_thread/thread/586c29ca813cd391/fb5f34c8f9eb9e3f?lnk=gst&q=mysql  
> +gem#fb5f34c8f9eb9e3f)
> 
> Now, when I start up the Rails 2.3.5 application using script/server,  
> it connects to the database just fine. But when I run rake db:migrate,

It looks like from that other thread that you installed the mysql gem  
in the ruby install in /usr/local but running rake is picking up the  
rake in the other ruby install, presumably because you haven’t  
installed rake in the /usr/local install.

Fred

---

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [July 5, 2010, 10:06am UTC](https://www.ruby-forum.com/t/mysql-gem-recognized-by-script-server-but-not-rake/191074/3 "2010-07-05T10:06:11Z")

</div>

Hi Fred,

I actually checked that. Ran “gem list rake” and it listed 0.8.7 . I  
also ran “gem update rake” but there were no updates to be made.

But now I uninstalled rake and then installed it again and its working  
now :). Weird.

Thanks for your response!

Cheers,  
Vinay.

On Jul 4, 10:02 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
