Wednesday, January 20, 2010

[Rails] Re: Rake Aborted wont Migrate mysql

Solved:

It appears to be a problem with mysql 5.1+ and I was even having it with
5.0.89. You can fix this by downloading the old libmysql.dll version
here:

http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll

Just put that file in your Ruby\bin directory, in my case I put that
inside:

C:\Ruby\bin

Restart your mysql and it should work just fine now.

Also another tidbit of information that might be helpful is that Ruby on
rails when you create your rails app it will generate your database.yml
using the default sqlite3 information instead of mysql. This tripped me
up at first. You can make it so that it makes this file using mysql
instead of sqlite3 by editing your:

app_generator.rb, you can find this file inside of:

C:\Ruby\lib\ruby\gems\1.8\gems\rails-2.3.5\lib\rails_generator\generators\applications\app\app_generator.rb

On line 9 you'll find:

DEFAULT_DATABASE = 'sqlite3'

change 'sqlite3' to 'mysql', now rails will generate your database.yml
file when creating a new app using mysql instead of sqlite3 defaults.

I hope this helps someone.


Andrew

--
Posted via http://www.ruby-forum.com/.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate