Hello all, Ok, so here is the report. Studying the source code I got to the interesting part:
connection_specification.rb (in activerecord/connection_adapters/abstract) def self.establish_connection(spec = ENV["DATABASE_URL"]) … remove_connection connection_handler.establish_connection name, spec end And here is where all the work comes… I tracked all this process, and the "problem" resides in that sqlite3 gem as well as the sqlite_adapter.rb (in active_record/connection_adapters) does not implement the "connect" method. The sqlite gem only performs a sqlite3_open call in the initialize method. There is a close method, but there isn't an open method. So the dummy one is called that does nothing, and you end with only the new closed connection. And a nice point to remark is also that this only happens when we have DDL transactions. With DDL transactions disabled (as in my previous email) the connection is recreated instead of reopened, and for this reason this works out of the box. Given that this is important for me, I am willing to implement those in the sqlite3 gem, as well as in the sqlite_adapter.rb. This way the connection can be opened. Changes are not complex, and they'd give us the same behavior as if it were the mysql adapter. What do you think ? Best regards, Rafael Fernández López. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
