apotonick/gemgem-trbrb

Uninitialized constant

Closed this issue · 2 comments

On the branch master, after running bundle

Andrew-Grimms-MacBook-Pro:gemgem-trbrb agrimm$ bin/rails s
=> Booting Thin
=> Rails 4.2.5 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
["app/concepts/api/v1.rb",
 "app/concepts/user/operation.rb",
 "app/concepts/thing/callback.rb",
 "app/concepts/thing/cell.rb",
 "app/concepts/thing/contract.rb",
 "app/concepts/thing/cell/form.rb",
 "app/concepts/thing/policy.rb",
 "app/concepts/thing/delete.rb",
 "app/concepts/thing/signed_in.rb",
 "app/concepts/thing/operation.rb",
 "app/concepts/session/impersonate.rb",
 "app/concepts/session/operation.rb",
 "app/concepts/navigation/cell.rb",
 "app/concepts/comment/cell.rb",
 "app/concepts/comment/operation.rb",
 "app/concepts/api/v1/thing/representer.rb",
 "app/concepts/api/v1/comment/representer.rb",
 "app/concepts/api/v1/comment/operation.rb",
 "app/concepts/api/v1/thing/operation.rb",
 "app/concepts/api/v1/comment/representer.rb",
 "app/concepts/api/v1/comment/operation.rb",
 "app/concepts/api/v1/thing/representer.rb",
 "app/concepts/api/v1/thing/operation.rb"]
Exiting
/Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:21:in `block in <class:Index>': uninitialized constant Comment::Representer (NameError)
    from /Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:20:in `initialize'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:20:in `new'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:20:in `<class:Index>'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:17:in `<module:Representer>'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:3:in `<module:Thing>'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:2:in `<module:V1>'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/app/concepts/api/v1/thing/representer.rb:1:in `<top (required)>'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/trailblazer-rails-0.2.3/lib/trailblazer/rails/railtie.rb:7:in `block in load_concepts'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/trailblazer-loader-0.0.5/lib/trailblazer/loader.rb:65:in `block in load_files'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/trailblazer-loader-0.0.5/lib/trailblazer/loader.rb:65:in `each'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/trailblazer-loader-0.0.5/lib/trailblazer/loader.rb:65:in `load_files'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/trailblazer-loader-0.0.5/lib/trailblazer/loader.rb:31:in `call'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/trailblazer-rails-0.2.3/lib/trailblazer/rails/railtie.rb:7:in `load_concepts'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/trailblazer-rails-0.2.3/lib/trailblazer/rails/railtie.rb:20:in `block (2 levels) in <class:Railtie>'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:446:in `instance_exec'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:446:in `block in make_lambda'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:192:in `call'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:192:in `block in simple'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `call'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `block in call'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `each'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:504:in `call'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:778:in `_run_prepare_callbacks'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:81:in `run_callbacks'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:50:in `block in <module:Finisher>'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `call'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/config/environment.rb:5:in `<top (required)>'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/config.ru:3:in `block in <main>'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/config.ru:in `new'
    from /Users/agrimm/ruby/wip/gemgem-trbrb/config.ru:in `<main>'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/agrimm/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'
Andrew-Grimms-MacBook-Pro:gemgem-trbrb agrimm$ 

What's your trailblazer-loader version?

Sometimes the loader can't pick up the right order, it's best to simply do this: https://github.com/trailblazer/trailblazer-loader#debugging

I might have been using an old version of the repo.