Problem installing MySQL with gem

Hello there. Iam new to Rails and yesterday started the procedure of installing/updating my ruby, rails, gem and mysql so that i can start learning the language. Im on Macintosh Snow Leopard 10.6

I issued the following commands on my terminal:

$ ruby --version ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

$ gem --version 1.3.7

(after updating it from 1.3.5)

$ rails --version Rails 3.0.1

(after updating it through gem , following the instructions from the rails website)

I installed the latest MySQL 32bit

Also i issued the following commands on my termilan:

$ which ruby /usr/bin/ruby

$ which rails /usr/bin/rails

$ which gem /usr/bin/gem

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

And i've set the PATH: (.bash_profile) export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

Having said all that i tried to install mysql through gem with the following command on the terminal:

$ sudo gem install mysql

and the result was this:

$ sudo gem install mysql Building native extensions. This could take a while... Successfully installed mysql-2.8.1 1 gem installed Installing ri documentation for mysql-2.8.1...

No definition for next_result

No definition for field_name

No definition for field_table

No definition for field_def

No definition for field_type

No definition for field_length

No definition for field_max_length

No definition for field_flags

No definition for field_decimals

No definition for time_inspect

No definition for time_to_s

No definition for time_get_year

No definition for time_get_month

No definition for time_get_day

No definition for time_get_hour

No definition for time_get_minute

No definition for time_get_second

No definition for time_get_neg

No definition for time_get_second_part

No definition for time_set_year

No definition for time_set_month

No definition for time_set_day

No definition for time_set_hour

No definition for time_set_minute

No definition for time_set_second

No definition for time_set_neg

No definition for time_set_second_part

No definition for time_equal

No definition for error_errno

No definition for error_sqlstate Installing RDoc documentation for mysql-2.8.1...

No definition for next_result

No definition for field_name

No definition for field_table

No definition for field_def

No definition for field_type

No definition for field_length

No definition for field_max_length

No definition for field_flags

No definition for field_decimals

No definition for time_inspect

No definition for time_to_s

No definition for time_get_year

No definition for time_get_month

No definition for time_get_day

No definition for time_get_hour

No definition for time_get_minute

No definition for time_get_second

No definition for time_get_neg

No definition for time_get_second_part

No definition for time_set_year

No definition for time_set_month

No definition for time_set_day

No definition for time_set_hour

No definition for time_set_minute

No definition for time_set_second

No definition for time_set_neg

No definition for time_set_second_part

No definition for time_equal

No definition for error_errno

No definition for error_sqlstate

Apparently the mysql plugin is not installed or not working with rails. How can i fix this?

I have no experience with any of these. Im trying to have all those ready so i can start studying/learning rails. Thank you

Attachments: http://www.ruby-forum.com/attachment/5277/terminal.txt

It is installed. Just ignore everything after:

thank you for your answer so why can't gem install the Ri and Rd documentation ? arent they necesary?

I am not sure, but I generally view the documentation online anyway personally. I doubt it is critical for you to have either installed for the gem to work properly.

ok i see well, i've been trying for 4 hours now to find my way with mysql and rails with no success. Seems like it can't connect to mysql at all through the rails commands (rake, etc...)

Switched to sqlite3 to give it a go and it worked right away.

So at the moment i'll stick to sqlite3 so i can start learning rails and not spend days trying to make mysql work.

I got a bit disappointed to be honest.

It may help if you copy and paste the errors. It should work out of the box, if nothing else.

Felipe Fel wrote in post #958750:

ok i see well, i've been trying for 4 hours now to find my way with mysql and rails with no success. Seems like it can't connect to mysql at all through the rails commands (rake, etc...)

Switched to sqlite3 to give it a go and it worked right away.

So at the moment i'll stick to sqlite3 so i can start learning rails and not spend days trying to make mysql work.

I got a bit disappointed to be honest.

Looks like you don't have libmysql-dev installed.

However, I'd strongly urge that you use PostgreSQL instead of MySQL. It's a much better DB.

Best,