views:

882

answers:

3

I upgraded mysql on my Mac from 5.0.x to 5.1.x (using a dmg package directly from mysql.com), which broke Rails (2.3.2). Previously everything was working correctly. The error I get is this:

!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.

So I tried re-installing the mysql gem, tried uninstalling and reinstalling, still no luck. (Command used to install: 'sudo gem install mysql -- --with-my-sql-config=*PATH TO mysql_config on my machine*'. The gem installs fine, but it doesn't fix the problem.

Did a lot of digging on the web, and couldn't find a solution that sounded right. There were some suggestions for Windows of copying an older mysql dll, so there may be some Mac analogue, but that just sounds wrong to me.

Anybody else hit this problem?

A: 

Shouldn't you have used sudo gem install mysql?

John Topley
Sorry, typo on my part. I did do sudo gem install.
A: 

Read this.

srboisvert
Yeah, I found that article and tried installing the mysql gem with the extra params, but it didn't seem to do anything more than just using the mysql_config param.
A: 

I finally sorted out what the problem was that was causing the 'bundled mysql.rb driver has been removed from Rails 2.2' error. If you read this entry in my blog (http://freevirusesandspyware.com/2009/05/upgrading-ruby-on-mac-os-x-leopard-from.html) you'll see my saga of updating ruby from 1.8.6 to 1.8.7 and the issues it caused with my gems. Well, I fixed those for my user account, but not for when I used sudo--they give different lists of installed gems when I do 'gem environment'/'sudo gem environment'. Ran the old gem tool and got the same list with and without sudo. Hmmm. So I tried uninstalling/reinstalling the mysql gem with the old gem tool, and bam! problem solved.