Quantcast
Viewing all articles
Browse latest Browse all 7239

MySQL and Ruby on Rails troubles (1 reply)

Hello all,

I've been having quite a bit of trouble getting MySQL to work with Ruby on Rails.

I already had MySQL installed on my system when I started working with Ruby on Rails. I've been installing things through gems, and ran into a little bit of trouble trying to install the MySQL gem. I made sure RubyGem was the latest version and tried:

$ sudo gem install mysql

This failed with some big long explanation, and after a bit of digging found this:

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

Which, reportedly, successfully installed MySQL.

But then when I tried to do a rake command to set up a database, I got:

$ rake db:create(in /directory/removed)
!!! 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

(See full trace by running task with --trace)

... much to my dismay. I'm not very good with this sort of thing, but `which mysql` gives the desired result:

$ which mysql
/usr/local/mysql/bin/mysql

All help is appreciated and thanks in advance!

Computer information:

Mac OS 10.6.4

MySQL version:
$ /usr/local/mysql/bin/mysql --version
/usr/local/mysql/bin/mysql Ver 14.14 Distrib 5.1.49, for apple-darwin10.3.0 (i386) using readline 5.1

Viewing all articles
Browse latest Browse all 7239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>