Disregard this.  I think it's a YAML parsing issue.  My references to &defaults 
are being evaluated, but none of the overridden options are being applied on 
top of them. i.e.

mysql_defaults: &mysql_defaults
  adapter: mysql
  encoding: UTF-8
  username: user
  password: pass
  host: localhost

development:
  <<: *mysql_defaults
  database: devdb

production:
  <<: *mysql_defaults
  database: productiondb
  host: master.db.site.com

Is just expanding to:


  "mysql_defaults" => {
    "adapter"=>"mysql",
    "encoding"=>"UTF-8",
    "username"=>"user",
    "password"=>"pass",
    "host"=>"localhost"
  },
  "development" => {
    "adapter"=>"mysql",
    "encoding"=>"UTF-8",
    "username"=>"user",
    "password"=>"pass",
    "host"=>"localhost"
  },
  "production" => {
    "adapter"=>"mysql",
    "encoding"=>"UTF-8",
    "username"=>"user",
    "password"=>"pass",
    "host"=>"localhost"
  }


On 26/05/2011, at 23:55, Chris Corbyn wrote:

> Hi Guys,
> 
> Can anybody think of what may be going on here?  I have an app that is 
> installed under RVM, with ruby 1.9.2 and DataMapper 1.1.0 (DataObjects 
> 0.10.6).  It has been running fine on a virtual machine with MySQL 5.0.67 and 
> we have installed it fresh on several developer VMs with this MySQL 
> configuration.
> 
> Today we updated our virtual machines.  Same configuration (RVM with Ruby 
> 1.9.2 + DataMapper 1.1.0), but using MySQL 5.1.41.
> 
> Rails fires up ok, and I see it connect to MySQL (well, I see the current 
> deprecation warnings), but whenever it tries to query the DB it errors with:
> 
> DataObjects::ConnectionError
> 
> Database must be specified
> 
> data_objects (0.10.6) lib/data_objects/connection.rb:79:in `initialize'
> data_objects (0.10.6) lib/data_objects/connection.rb:79:in `new'
> data_objects (0.10.6) lib/data_objects/pooling.rb:177:in `block in new'
> <internal:prelude>:10:in `synchronize'
> data_objects (0.10.6) lib/data_objects/pooling.rb:172:in `new'
> data_objects (0.10.6) lib/data_objects/pooling.rb:119:in `new'
> data_objects (0.10.6) lib/data_objects/connection.rb:68:in `new'
> dm-do-adapter (1.1.0) lib/dm-do-adapter/adapter.rb:251:in `open_connection'
> dm-do-adapter (1.1.0) lib/dm-do-adapter/adapter.rb:276:in `with_connection'
> dm-do-adapter (1.1.0) lib/dm-do-adapter/adapter.rb:33:in `select'
> actionpack (3.0.7) 
> lib/action_dispatch/middleware/session/abstract_store.rb:195:in `block in 
> load_session'
> actionpack (3.0.7) 
> lib/action_dispatch/middleware/session/abstract_store.rb:223:in 
> `stale_session_check!'
> actionpack (3.0.7) 
> lib/action_dispatch/middleware/session/abstract_store.rb:193:in `load_session'
> actionpack (3.0.7) 
> lib/action_dispatch/middleware/session/abstract_store.rb:121:in `load!'
> actionpack (3.0.7) 
> lib/action_dispatch/middleware/session/abstract_store.rb:113:in 
> `load_for_read!'
> actionpack (3.0.7) 
> lib/action_dispatch/middleware/session/abstract_store.rb:53:in `[]'
> actionpack (3.0.7) lib/action_dispatch/middleware/flash.rb:178:in `call'
> ( + more .... )
> 
> Everything is the same at the code level.  Same database name, same 
> passwords, everything... the diff has absolutely no changes.  The only change 
> is MySQL 5.1 instead of 5.0.
> 
> Any ideas?
> 
> Cheers,
> 
> Chris
> 

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en.

Reply via email to