{"action":"created","issue":{"url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/158","labels_url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/158/comments","events_url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/158/events","html_url":"https://github.com/tim-vandecasteele/grape-swagger/issues/158","id":46874721,"number":158,"title":"i get this error : NoMethodError - undefined method `settings' for API:Class:","user":{"login":"85636682","id":1079461,"avatar_url":"https://avatars.githubusercontent.com/u/1079461?v=3","gravatar_id":"","url":"https://api.github.com/users/85636682","html_url":"https://github.com/85636682","followers_url":"https://api.github.com/users/85636682/followers","following_url":"https://api.github.com/users/85636682/following{/other_user}","gists_url":"https://api.github.com/users/85636682/gists{/gist_id}","starred_url":"https://api.github.com/users/85636682/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/85636682/subscriptions","organizations_url":"https://api.github.com/users/85636682/orgs","repos_url":"https://api.github.com/users/85636682/repos","events_url":"https://api.github.com/users/85636682/events{/privacy}","received_events_url":"https://api.github.com/users/85636682/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/labels/bug%3F","name":"bug?","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-10-27T06:42:10Z","updated_at":"2015-01-08T01:59:55Z","closed_at":"2014-11-10T20:10:28Z","body":"my gem file:\r\n```\r\n# Grape APIs\r\ngem 'grape', github: 'intridea/grape'\r\ngem 'grape-entity'\r\ngem 'grape-swagger'  '0.7.2'\r\ngem 'grape-swagger-rails',  '0.0.10'\r\n```\r\n\r\n```\r\nNoMethodError - undefined method `settings' for API:Class:\r\n  grape-swagger (0.7.2) lib/grape-swagger.rb:220:in `content_types_for'\r\n  grape-swagger (0.7.2) lib/grape-swagger.rb:107:in `block in setup'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/endpoint.rb:47:in `block in generate_api_method'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/endpoint.rb:243:in `run'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/endpoint.rb:191:in `block in call!'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/middleware/base.rb:24:in `call!'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/middleware/base.rb:18:in `call'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/middleware/error.rb:27:in `block in call!'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/middleware/error.rb:26:in `call!'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/middleware/base.rb:18:in `call'\r\n  rack (1.5.2) lib/rack/head.rb:11:in `call'\r\n  rack (1.5.2) lib/rack/builder.rb:138:in `call'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/endpoint.rb:192:in `call!'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/endpoint.rb:180:in `call'\r\n  rack-mount (0.8.3) lib/rack/mount/route_set.rb:152:in `block in call'\r\n  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:96:in `block in recognize'\r\n  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:68:in `optimized_each'\r\n  rack-mount (0.8.3) lib/rack/mount/code_generation.rb:95:in `recognize'\r\n  rack-mount (0.8.3) lib/rack/mount/route_set.rb:141:in `call'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/api.rb:104:in `call'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/api.rb:33:in `call!'\r\n   () Users/stephen/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/bundler/gems/grape-4288dd351938/lib/grape/api.rb:29:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/journey/router.rb:71:in `block in call'\r\n  actionpack (4.1.1) lib/action_dispatch/journey/router.rb:59:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/routing/route_set.rb:676:in `call'\r\n  rack-cors (0.2.9) lib/rack/cors.rb:54:in `call'\r\n  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'\r\n  warden (1.2.3) lib/warden/manager.rb:34:in `call'\r\n  rack (1.5.2) lib/rack/etag.rb:23:in `call'\r\n  rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'\r\n  rack (1.5.2) lib/rack/head.rb:11:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/flash.rb:254:in `call'\r\n  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'\r\n  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'\r\n  activerecord (4.1.1) lib/active_record/query_cache.rb:36:in `call'\r\n  activerecord (4.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'\r\n  activerecord (4.1.1) lib/active_record/migration.rb:380:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'\r\n  activesupport (4.1.1) lib/active_support/callbacks.rb:82:in `run_callbacks'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'\r\n  better_errors (2.0.0) lib/better_errors/middleware.rb:84:in `protected_app_call'\r\n  better_errors (2.0.0) lib/better_errors/middleware.rb:79:in `better_errors_call'\r\n  better_errors (2.0.0) lib/better_errors/middleware.rb:57:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'\r\n  railties (4.1.1) lib/rails/rack/logger.rb:38:in `call_app'\r\n  railties (4.1.1) lib/rails/rack/logger.rb:20:in `block in call'\r\n  activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'\r\n  activesupport (4.1.1) lib/active_support/tagged_logging.rb:26:in `tagged'\r\n  activesupport (4.1.1) lib/active_support/tagged_logging.rb:68:in `tagged'\r\n  railties (4.1.1) lib/rails/rack/logger.rb:20:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'\r\n  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'\r\n  rack (1.5.2) lib/rack/runtime.rb:17:in `call'\r\n  activesupport (4.1.1) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'\r\n  rack (1.5.2) lib/rack/lock.rb:17:in `call'\r\n  actionpack (4.1.1) lib/action_dispatch/middleware/static.rb:64:in `call'\r\n  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'\r\n  railties (4.1.1) lib/rails/engine.rb:514:in `call'\r\n  railties (4.1.1) lib/rails/application.rb:144:in `call'\r\n  rack (1.5.2) lib/rack/content_length.rb:14:in `call'\r\n  thin (1.6.3) lib/thin/connection.rb:86:in `block in pre_process'\r\n  thin (1.6.3) lib/thin/connection.rb:84:in `pre_process'\r\n  thin (1.6.3) lib/thin/connection.rb:53:in `process'\r\n  thin (1.6.3) lib/thin/connection.rb:39:in `receive_data'\r\n  eventmachine (1.0.3) lib/eventmachine.rb:187:in `run'\r\n  thin (1.6.3) lib/thin/backends/base.rb:73:in `start'\r\n  thin (1.6.3) lib/thin/server.rb:162:in `start'\r\n  rack (1.5.2) lib/rack/handler/thin.rb:16:in `run'\r\n  rack (1.5.2) lib/rack/server.rb:264:in `start'\r\n  railties (4.1.1) lib/rails/commands/server.rb:69:in `start'\r\n  railties (4.1.1) lib/rails/commands/commands_tasks.rb:81:in `block in server'\r\n  railties (4.1.1) lib/rails/commands/commands_tasks.rb:76:in `server'\r\n  railties (4.1.1) lib/rails/commands/commands_tasks.rb:40:in `run_command!'\r\n  railties (4.1.1) lib/rails/commands.rb:17:in `<top (required)>'\r\n  bin/rails:8:in `<top (required)>'\r\n  spring (1.1.3) lib/spring/client/rails.rb:27:in `call'\r\n  spring (1.1.3) lib/spring/client/command.rb:7:in `call'\r\n  spring (1.1.3) lib/spring/client.rb:26:in `run'\r\n  spring (1.1.3) bin/spring:48:in `<top (required)>'\r\n  spring (1.1.3) lib/spring/binstub.rb:11:in `<top (required)>'\r\n  /Users/stephen/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'\r\n  bin/spring:16:in `<top (required)>'\r\n  bin/rails:3:in `<main>'\r\n```"},"comment":{"url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/comments/69125260","html_url":"https://github.com/tim-vandecasteele/grape-swagger/issues/158#issuecomment-69125260","issue_url":"https://api.github.com/repos/tim-vandecasteele/grape-swagger/issues/158","id":69125260,"user":{"login":"faisal-ali","id":3125313,"avatar_url":"https://avatars.githubusercontent.com/u/3125313?v=3","gravatar_id":"","url":"https://api.github.com/users/faisal-ali","html_url":"https://github.com/faisal-ali","followers_url":"https://api.github.com/users/faisal-ali/followers","following_url":"https://api.github.com/users/faisal-ali/following{/other_user}","gists_url":"https://api.github.com/users/faisal-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/faisal-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faisal-ali/subscriptions","organizations_url":"https://api.github.com/users/faisal-ali/orgs","repos_url":"https://api.github.com/users/faisal-ali/repos","events_url":"https://api.github.com/users/faisal-ali/events{/privacy}","received_events_url":"https://api.github.com/users/faisal-ali/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T01:59:55Z","updated_at":"2015-01-08T01:59:55Z","body":"It might sound stupid, but I was having the same issue, and all I did was swap [ gem 'grape' ] above [ gem 'grape-swagger' ] in Gemfile. It fixed the issue for me."}}