Forum: Ruby on Rails rake db_schema_import on vanilla schema.rb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Lorenzo B. (Guest)
on 2006-05-30 16:59
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
Lorenzo B. (Guest)
on 2006-05-30 19:36
Lorenzo B. 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/HowtoConne...

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
This topic is locked and can not be replied to.