You're on a road less traveled so it's not going to be smooth sailing, however digging into the codebase and tracing whats being executed has been the most reliable option for me.
For Datamapper, Martin wrote a pretty good blog post on the api changes from 0.10. However, Datamapper is not 1.0 yet so expect more API changes in the future. http://sick.snusnu.info/2009/06/03/migrating-to-datamapper-0100/ You also might want to check out Sequel if you're interested in a more stable ORM (http://sequel.rubyforge.org/). I personally love Datamapper, but its a bit of a minefield at the moment as it marches towards 1.0 release. On Oct 14, 2:48 pm, Ming <[email protected]> wrote: > Thanks, I figured that out. It should have been obvious to me. > > I'm starting with virgin code, but using snippets and examples for > merb from around the web. Is there an easy way of seeing the major > API changes? > > On Oct 14, 3:41 pm, Jacques Crocker <[email protected]> wrote: > > > > > :merb_env rake task loads your merb environment (which includes > > models). You have invalid syntax on one of your models (post.rb). > > Datamapper 0.10 has changed some syntax, so you'll need to get your > > code updated to reflect the new API. > > > On Oct 13, 2009, at 1:41 AM, Ming wrote: > > > > I'm running merb edge, 10/09/2009, with datamapper 0.10.1. > > > >> rake dx:poop --trace > > > > namespace :dx do > > > > desc "rake test" > > > task :poop do > > > puts "hi" > > > end > > > end > > > > works fine: > > > > (in /home/coder/code/ruby/test_app) > > > Merb root at: /home/coder/code/ruby/test_app > > > Loading init file from ./config/init.rb > > > Loading ./config/environments/development.rb > > > ** Invoke dx:poop (first_time) > > > ** Execute dx:poop > > > hi > > > > but executing > > > > namespace :dx do > > > > desc "rake test" > > > task :poop => :merb_env do > > > puts "hi" > > > end > > > end > > > > with > > > >> MERB_ENV=development rake dx:poop --trace > > > > bombs below, notably > > > > +type+ should be Class or Module, but was Hash > > > > /home/coder/code/ruby/test_app/app/models/post.rb:7 <-- why is one of > > > my models referenced?? > > > > (in /home/coder/code/ruby/test_app) > > > Merb root at: /home/coder/code/ruby/test_app > > > Loading init file from ./config/init.rb > > > Loading ./config/environments/development.rb > > > ** Invoke dx:poop (first_time) > > > ** Invoke merb_env (first_time) > > > ** Execute merb_env > > > Merb root at: /home/coder/code/ruby/test_app > > > Loading ./config/environments/development.rb > > > ~ Loaded DEVELOPMENT Environment... > > > ~ Connecting to database... > > > ~ Loaded slice 'MerbAuthSlicePassword' ... > > > ~ Parent pid: 3902 > > > rake aborted! > > > +type+ should be Class or Module, but was Hash > > > /usr/lib/ruby/gems/1.8/gems/dm-core-0.10.1/lib/dm-core/model/ > > > property.rb:51:in `new' > > > /usr/lib/ruby/gems/1.8/gems/dm-core-0.10.1/lib/dm-core/model/ > > > property.rb:51:in `property' > > > /home/coder/code/ruby/test_app/app/models/post.rb:7 > > > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > > > `gem_original_require' > > > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in > > > `require' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 900:in `load_file' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 934:in `load_classes' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 932:in `each' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 932:in `load_classes' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 931:in `each' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 931:in `load_classes' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 678:in `run' > > > /usr/lib/ruby/gems/1.8/gems/extlib-0.9.13/lib/extlib/dictionary.rb: > > > 268:in `each' > > > /usr/lib/ruby/gems/1.8/gems/extlib-0.9.13/lib/extlib/dictionary.rb: > > > 268:in `each' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 676:in `run' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/bootloader.rb: > > > 99:in `run' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/server.rb: > > > 172:in `bootup' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core/server.rb: > > > 42:in `start' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core.rb:169:in > > > `start' > > > /usr/lib/ruby/gems/1.8/gems/merb-core-1.1/lib/merb-core.rb:182:in > > > `start_environment' > > > /home/coder/code/ruby/test_app/Rakefile:23 > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in > > > `invoke_with_call_chain' > > > /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > > > `invoke_with_call_chain' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in > > > `invoke_prerequisites' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in > > > `invoke_prerequisites' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in > > > `invoke_with_call_chain' > > > /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in > > > `invoke_with_call_chain' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in > > > `invoke_task' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > > > `standard_exception_handling' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in > > > `standard_exception_handling' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' > > > /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > > > /var/lib/gems/1.8/bin/rake:19:in `load' > > > /var/lib/gems/1.8/bin/rake:19 > > > > TIA for any insight on the problem. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
