clst/activerecord-sqlanywhere-adapter — comment on commit dfad24008b9c67b5c93635f2e4537101b3be04d4
File:  line 0
By scollison:

The information is there:
irb(main):001:0> puts Rails.configuration.database_configuration
{"development"=>{"adapter"=>"sqlite3", "database"=>"db/dev.db", "pool"=>5,
"timeout"=>5000}, "test"=>{"adapter"=>"sqlite3", "database"=>"db/test.db",
"pool"=>5, "timeout"=>5000}, "production"=>{"adapter"=>"sqlite3",
"database"=>"db/prod.db", "pool"=>5, "timeout"=>5000},
"monitordb"=>{"adapter"=>"sqlanywhere", "database"=>"xxx",
"commlinks"=>"TCPIP(HOST=xxx)", "encoding"=>"utf-8", "username"=>"xxx",
"password"=>"xxx"}}

The sqlanywhere database is a vendor supplied read-only datasource, which
required abstracting the AR connection to 'monitordb'. Is there another way
to get the encoding information from the connection other than reading the
Rails environment?

On Tue, Jan 17, 2012 at 3:30 AM, clst <
reply@reply.github.com
> wrote:

> Out of curiosity what dies the output of: puts
> Rails.configuration.database_configuration.to_yaml look like on your rails
> console?
> Is it identical to: puts ActiveRecord::Base.configurations.to_yaml ?
> If you are not using the default configurations how did you configure your
> rails?
> Other than those the only way would be to parse database.yml directly
> AFAIK.
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/clst/activerecord-sqlanywhere-adapter/commit/dfad24008b9c67b5c93635f2e4537101b3be04d4#commitcomment-873585
>