This forum is no longer active. Please post your questions to our new community site

Mysql gem problem

Subscribe to Mysql gem problem 8 post(s), 2 voice(s)

 
Avatar amdevx 11 post(s)

I keep getting this error when using rake db:schema:load or rails_env=development rake db:migrate. I have the mysql gem installed which is version 2.8.1. I am on mac os x.

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

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Are you running the command from the “rubyconsole”? Try the following:

$ cd /Applications/rubystack-(version)
$ ./rubyconsole
$ your_rake_command

 
Avatar amdevx 11 post(s)

Yes, and I just tried it like you said but I am still getting the same error

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

Which is your current Rails version? Could you try the following:

$ gem install mysql -- --with-mysql-dir=/Applications/rubystack-(version)/mysql/ 

It requires to have installed the Xcode tools.

 
Avatar amdevx 11 post(s)

I am running rails version 2.3.5. I tried your solution, but unfortunately I am still getting same error for some reason. I have Xcode installed.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

That’s strange. Could you let us know the exact application that you are using to run the “rake db:schema:load” command and reproduce on our side? It is possible that the application ships their own rails version.

 
Avatar amdevx 11 post(s)

Sure :) Here is the app I am trying to run:

https://github.com/apupeikis/warehouse

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Right,

This application requires to install the gems with bundler. Try the following in the application directory:

1. Edit Gemfile and add:

gem ‘mysql’

2. Run “bundle install”.

I hope it helps.