{"action":"created","issue":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/248","labels_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/248/comments","events_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/248/events","html_url":"https://github.com/cerebris/jsonapi-resources/issues/248","id":86717848,"number":248,"title":"uninitialized constant JSONAPI error with config.eager_load = true","user":{"login":"seizadi","id":1612707,"avatar_url":"https://avatars.githubusercontent.com/u/1612707?v=3","gravatar_id":"","url":"https://api.github.com/users/seizadi","html_url":"https://github.com/seizadi","followers_url":"https://api.github.com/users/seizadi/followers","following_url":"https://api.github.com/users/seizadi/following{/other_user}","gists_url":"https://api.github.com/users/seizadi/gists{/gist_id}","starred_url":"https://api.github.com/users/seizadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seizadi/subscriptions","organizations_url":"https://api.github.com/users/seizadi/orgs","repos_url":"https://api.github.com/users/seizadi/repos","events_url":"https://api.github.com/users/seizadi/events{/privacy}","received_events_url":"https://api.github.com/users/seizadi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-09T20:03:36Z","updated_at":"2015-06-09T20:50:21Z","closed_at":"2015-06-09T20:50:21Z","body":"Following the site README with new test project. I have error w/ controller generation with config.eager_load = true, when I turn it off the error goes away.\r\n-Soheil\r\n\r\n$ rails g controller Users --skip-assets\r\n/Users/seizadi/hadoop/rails-projects/threatfeed/jsonapi/tfwebserver/app/controllers/application_controller.rb:1:in `<top (required)>': uninitialized constant JSONAPI (NameError)\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `call'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'\r\n\tfrom /Users/seizadi/hadoop/rails-projects/threatfeed/jsonapi/tfwebserver/config/environment.rb:5:in `<top (required)>'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/spring-1.3.6/lib/spring/application.rb:92:in `require'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/spring-1.3.6/lib/spring/application.rb:92:in `preload'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'\r\n\tfrom /Users/seizadi/.rvm/gems/ruby-2.2.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'\r\n\tfrom /Users/seizadi/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'\r\n\tfrom -e:1:in `<main>'\r\n"},"comment":{"url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/comments/110500382","html_url":"https://github.com/cerebris/jsonapi-resources/issues/248#issuecomment-110500382","issue_url":"https://api.github.com/repos/cerebris/jsonapi-resources/issues/248","id":110500382,"user":{"login":"seizadi","id":1612707,"avatar_url":"https://avatars.githubusercontent.com/u/1612707?v=3","gravatar_id":"","url":"https://api.github.com/users/seizadi","html_url":"https://github.com/seizadi","followers_url":"https://api.github.com/users/seizadi/followers","following_url":"https://api.github.com/users/seizadi/following{/other_user}","gists_url":"https://api.github.com/users/seizadi/gists{/gist_id}","starred_url":"https://api.github.com/users/seizadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seizadi/subscriptions","organizations_url":"https://api.github.com/users/seizadi/orgs","repos_url":"https://api.github.com/users/seizadi/repos","events_url":"https://api.github.com/users/seizadi/events{/privacy}","received_events_url":"https://api.github.com/users/seizadi/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T20:50:21Z","updated_at":"2015-06-09T20:50:21Z","body":"Sorry, this was my error did not include Gem in Gemfile."}}