Lorenzo Bolognini
2006-May-30 12:59 UTC
[Rails] rake db_schema_import on vanilla schema.rb
Hi all, I dumped my schema from SQLServer 2000 without any problems. I then tried to "rake db_schema_import" on MySQL 4. To do this i changed my database.yml settings to use the mysql adapter (as it was set to use sqlsever before) and attempted the import. I haven''t changed a thing in the schema.rb script and, even though I do have generated a migration, I think I don''t even need it and rake simply ignores it (or I guess it does). The rake script exits like this: C:\Lorenzo\therapy>rake db_schema_import (in C:/Lorenzo/therapy) rake aborted! undefined method `[]='' for #<Mysql> (See full trace by running task with --trace) Anybody knows what the story is? Thanks in advance, Lorenzo -- Posted via http://www.ruby-forum.com/.
Lorenzo Bolognini
2006-May-30 15:36 UTC
[Rails] Re: rake db_schema_import on vanilla schema.rb
Lorenzo Bolognini wrote:> C:\Lorenzo\therapy>rake db_schema_import > (in C:/Lorenzo/therapy) > rake aborted! > undefined method `[]='' for #<Mysql>Reply to self: to make rake work on sqlserver I added the line suggested here to environment.rb to fix OLE errors: http://wiki.rubyonrails.com/rails/pages/HowtoConnectToMicrosoftSQLServer/ That same line got in MySQL way when I switched the adapter from sqlserver to mysql Commenting that line fixed everything and rake db_schema_import worked as expected. Lorenzo -- Posted via http://www.ruby-forum.com/.