I think this is a bug.  The problem turned out to be with the use of
the "defaults" YAML syntax not getting parsed correctly.  I tried just
using standard YAML, like so:

development:
  adapter:  mysql
  database: myapp_development
  username: me
  password: 12345
  host: localhost

test:
  adapter:  mysql
  database: myapp_test
  username: me
  password: 12345
  host: localhost

... and things worked as expected.  Hope this saves someone else some
time.


On Sep 21, 11:50 am, LinPan <[EMAIL PROTECTED]> wrote:
> I'm not sure if this is a DataMapper or a Merb issue.  I've set up a
> trivial spec to test one of my models, but when I try to run the spec,
> I get the following error:
>
> /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require': no such file to load -- /Library/Ruby/Gems/1.8/
> gems/dm-core-0.9.5/lib/dm-core/adapters/_adapter (LoadError)
>         from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from /Library/Ruby/Gems/1.8/gems/dm-core-0.9.5/lib/dm-core.rb:145:in
> `setup'
>         from /Library/Ruby/Gems/1.8/gems/merb_datamapper-0.9.7/lib/merb/orms/
> data_mapper/connection.rb:44:in `setup_connections'
>         from /Library/Ruby/Gems/1.8/gems/merb_datamapper-0.9.7/lib/merb/orms/
> data_mapper/connection.rb:27:in `connect'
>         from /Library/Ruby/Gems/1.8/gems/merb_datamapper-0.9.7/lib/
> merb_datamapper.rb:16:in `run'
>         from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.7/lib/merb-core/
> bootloader.rb:69:in `run'
>         from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.7/lib/merb-core/
> server.rb:51:in `start'
>         from /Library/Ruby/Gems/1.8/gems/merb-core-0.9.7/lib/merb-core.rb:
> 108:in `start'
>          ... 7 levels...
>         from /Library/Ruby/Gems/1.8/gems/rspec-1.1.4/lib/spec/runner/
> example_group_runner.rb:13:in `load_files'
>         from /Library/Ruby/Gems/1.8/gems/rspec-1.1.4/lib/spec/runner/
> options.rb:98:in `run_examples'
>         from /Library/Ruby/Gems/1.8/gems/rspec-1.1.4/lib/spec/runner/
> command_line.rb:19:in `run'
>         from /Library/Ruby/Gems/1.8/gems/rspec-1.1.4/bin/spec:4
> rake aborted!
> Command /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/
> ruby -I"/Library/Ruby/Gems/1.8/gems/rspec-1.1.4/lib" "/Library/Ruby/
> Gems/1.8/gems/rspec-1.1.4/bin/spec" "spec/models/product_spec.rb" --
> options ./spec/spec.opts failed
>
> It looks like the adapter isn't getting set appropriately.  However,
> this is only a problem when running the spec.  I can access and
> interact with the data fine using the Merb console.  My connections
> are stored in a standard YAML file:
>
> development: &defaults
>   adapter:  mysql
>   database: myapp_development
>   username: me
>   password: 12345
>   host:     localhost
>
> test:
>   << *defaults
>   database: myapp_test
>
> Does anyone know what I might be doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to