Problem installing MySQL gem on Fedora

When I try to use rake db: migrate, I get the following error:

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

And when I try gem install mysql

Building native extensions. This could take a while... ERROR: Error installing
mysql: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb
Can't find header files for ruby. Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

was also checked, but the same error. I am in Fedora 10. Help would be greatly appreciated. Thank!

+5
source share
1 answer

Before you can install the MySQL game, you will need Fedora development packages for both Ruby and MySQL. Try:

$ sudo yum -y install gcc mysql-devel ruby-devel rubygems

and then try again:

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

(Also check that / usr / local / mysql / bin is the right place for mysql_config, it could be / usr / bin instead.)

+9
source

All Articles