Question

I am on Windows 7 and trying to use MySQL with Rails 3, I am beginner and just reading Rails tutorials, there is this configuration given:

development:
adapter: mysql2
encoding: utf8
database: blog_development
pool: 5
username: root
password:
socket: /tmp/mysql.sock

I have MySQL installed in Xampp, so where can I mention that it can access MySQL with localhost, what changes will be required, so that I can use that MySQL with Rails 3 app?

Was it helpful?

Solution

mysql2 gem installation is similar to mysql gem installation. Please see the following blog post which contains installation instructions for mysql gem:

http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

You can ignore the MySQL installation instructions. You will need MySQL Connector/C download and then copy libmysql.dll from it to your Ruby installation (RailsInstaller one).

Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top