bl00dshooter
bl00dshooter

Reputation: 991

Installing mysql2 gem with ruby 1.8.7 Mac OSX 10.6

I am currently trying to install the mysql2 gem, under Ruby 1.8.7 and Mac 10.6.6 and mysql 64 bits, so I can use Rails 3 and mysql together.

When I do the command:

sudo gem install mysql2

I get:

Building native extensions.  This could take a while...
Successfully installed mysql2-0.2.6
1 gem installed
Installing ri documentation for mysql2-0.2.6...
Enclosing class/module 'mMysql2' for class Client not known
Enclosing class/module 'mMysql2' for class Result not known
Installing RDoc documentation for mysql2-0.2.6...
Enclosing class/module 'mMysql2' for class Client not known
Enclosing class/module 'mMysql2' for class Result not known

I did a lot of things recommended for this problem here on SO, but nothing seemed to help.

Has anyone got a idea about what to do next?

Edit: When I try do to rake db:migrate, it says: http://pastebin.com/tuPwQmqL. I can't do rails server either.

Edit 2: Managed to do it, thanks!

Upvotes: 2

Views: 2590

Answers (2)

Peter Brown
Peter Brown

Reputation: 51697

If you're using Rails 3, you should definitely be using Bundler and not doing sudo gem install anything. Add mysql2 to your Gemfile and just run bundle. That should install without any errors and let you run rake commands.

Upvotes: 1

Rishav Rastogi
Rishav Rastogi

Reputation: 15482

This is just a warning that the documentation for a module is empty. It shouldn't cause any problems.

If you are able to your commands like "rake db:migrate" etc. Everything is fine :)

Update: http://freddyandersen.wordpress.com/2010/10/03/mysql-5-5-snow-leopard-and-rails/. This link should solve your problem. I faced the same problem on my other mac :)

Upvotes: 3

Related Questions