As far as I know, the only thing you need to change is database.yaml. So I set up it, changing adapter from mysql to sqlite and pointing to the file, which should play a role of database. Now when I try to run rake db:create an error pops up saying "Could not find table ''users''". Why''s that and how to override this? By logic, db:create is only creating a blank database, without any table in it. So, what''s the deal with tables then? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
truetype
2008-Jan-27 19:43 UTC
Re: Changing the database from mysql to sqlite3 - need help
I found solution. The reason why rake aborted was that the environment.rb had some observers set up. It seems that these observers tried to communicate with a model, which table had not been created. That''s how it should be though - you can''t have a table for a model in the database, if you don''t have the database. And the error occurred when I was trying to run rake db:create. So, it seems now that the only solution is to comment observers in the environment.rb before creating the database and comment them when the database is created, which is a little stupid - who knows how much times I would need to drop database and create it again and now I need to comment and uncomment observers each time? Does anyone know better solution? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---