views:

393

answers:

1

Hi, I have to connect to a legacy DB wich has a schema called "Financeiro". I setup my database.yml to:

... 
schema_search_path: Financeiro 
...

when activerecord tries to find something I get the following error:

ActiveRecord::StatementInvalid: RuntimeError: ERROR     C3F000  Mschema "financeiro" does not exist F.\src\backend\catalog\namespace.c      L2898   Rassign_search_path: SET    search_path TO Financeiro from 
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log'

Note that in the error message I get financeiro (downcase). If I rename the schema to financeiro downcase it works well. But it is not possible in the production environment. Thanks.

A: 

try "Financeiro" with the quotes. If that makes it through into the SQL, it should work. In general, the SQL standard requires identifiers to be case insensitive, unless quoted. You may have to do some special quoting to get the double-quotes through from the yml file to the actual SQL. I don't know Rails/Ruby at all.

reedstrm