#126 open
David

resource generation fails first time

Reported by David | May 6th, 2008 @ 01:51 PM | in 1.0 (Nearish Future)

I'm running edge Merb and edge DataMapper.

merb-gen app zoo

merb-gen resource lion

fails the first time, apparently because of a resource_controller dependency problem:

  dependency  model
      exists    app
      create    app/models
      create    app/models/lion.rb
  dependency    merb_model_test
      exists      spec
      create      spec/models
      create      spec/models/lion_spec.rb
  dependency  resource_controller
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:478:in `const_missing_before_generators': uninitialized constant ResourceControllerGenerator::Lion

(I must admit that I am surprised to see that activesupport is getting referenced, dunno if that has anything to do with it.)

The second time I run the same command, everything generates.

merb-gen resource lion

  dependency  model
      exists    app
      exists    app/models
   identical    app/models/lion.rb
  dependency    merb_model_test
      exists      spec
      exists      spec/models
   identical      spec/models/lion_spec.rb
  dependency  resource_controller
      exists    app
      exists    app/controllers
      exists    app/helpers
      exists    app/views
      create    app/views/lions
      create    app/controllers/lions.rb
      create    app/helpers/lions_helper.rb
      create    app/views/lions/edit.html.erb
      create    app/views/lions/index.html.erb
      create    app/views/lions/new.html.erb
      create    app/views/lions/show.html.erb
  dependency    merb_resource_controller_test
      create      spec/controllers/
      create      spec/helpers/
      exists      spec
      exists      spec/controllers
      exists      spec/helpers
      create      spec/views
      create      spec/views/lions
      create      spec/controllers/lions_spec.rb
      create      spec/helpers/lions_helpers.rb
      create      spec/views/lions/delete.html.erb_spec.rb
      create      spec/views/lions/edit.html.erb_spec.rb
      create      spec/views/lions/index.html.erb_spec.rb
      create      spec/views/lions/new.html.erb_spec.rb
      create      spec/views/lions/show.html.erb_spec.rb

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket