{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/15843","labels_url":"https://api.github.com/repos/rails/rails/issues/15843/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/15843/comments","events_url":"https://api.github.com/repos/rails/rails/issues/15843/events","html_url":"https://github.com/rails/rails/issues/15843","id":36218504,"number":15843,"title":"Incompatibility between Rack::Session and ActionDispatch::Request::Session","user":{"login":"pboling","id":19505,"avatar_url":"https://avatars.githubusercontent.com/u/19505?v=3","gravatar_id":"","url":"https://api.github.com/users/pboling","html_url":"https://github.com/pboling","followers_url":"https://api.github.com/users/pboling/followers","following_url":"https://api.github.com/users/pboling/following{/other_user}","gists_url":"https://api.github.com/users/pboling/gists{/gist_id}","starred_url":"https://api.github.com/users/pboling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboling/subscriptions","organizations_url":"https://api.github.com/users/pboling/orgs","repos_url":"https://api.github.com/users/pboling/repos","events_url":"https://api.github.com/users/pboling/events{/privacy}","received_events_url":"https://api.github.com/users/pboling/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/actionpack","name":"actionpack","color":"FFF700"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-06-21T07:11:39Z","updated_at":"2015-01-14T20:17:26Z","closed_at":null,"body":"It is preventing integration testing in test-unit of my **Grape** app mounted in my Rails 4.1.1 routes.rb file.\r\n\r\nHere's a simplified example: https://github.com/pboling/x-cascade_header_rails/tree/e34a94ba76f9350aed13486f282e99a98e2d9821\r\n\r\n(Never mind the name of the repo... I was trying to understand the X-Cascade Header.)\r\n\r\nRepro after checking out the repo, bundle install, rake db:migrate:\r\n\r\n```\r\nbin/rake test\r\n...\r\n  1) Failure:\r\nXCascadeGrapeTest#test_/api/auth/login_invalid_credentials_is_401 [/Users/pboling/Documents/src/my/x-cascade_header_rails/test/integration/x_cascade_grape_test.rb:10]:\r\n{\"error\":\"undefined method `each' for #\\u003cActionDispatch::Request::Session:0x103aebb00 not yet loaded\\u003e\"}.\r\nExpected: 401\r\n  Actual: 500\r\n```\r\n\r\n1. Here's another of the **exact** same error from **Sinatra** mounted in rails:\r\nhttps://gist.github.com/toolmantim/9597022\r\n\r\n2. Here is another report of the same error from a Grape app mounted in Rails 4.0.2:\r\nhttp://stackoverflow.com/questions/22439361/rspec-testing-api-with-rack-protection"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/69983719","html_url":"https://github.com/rails/rails/issues/15843#issuecomment-69983719","issue_url":"https://api.github.com/repos/rails/rails/issues/15843","id":69983719,"user":{"login":"joost","id":91466,"avatar_url":"https://avatars.githubusercontent.com/u/91466?v=3","gravatar_id":"","url":"https://api.github.com/users/joost","html_url":"https://github.com/joost","followers_url":"https://api.github.com/users/joost/followers","following_url":"https://api.github.com/users/joost/following{/other_user}","gists_url":"https://api.github.com/users/joost/gists{/gist_id}","starred_url":"https://api.github.com/users/joost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joost/subscriptions","organizations_url":"https://api.github.com/users/joost/orgs","repos_url":"https://api.github.com/users/joost/repos","events_url":"https://api.github.com/users/joost/events{/privacy}","received_events_url":"https://api.github.com/users/joost/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T20:17:26Z","updated_at":"2015-01-14T20:17:26Z","body":"Trying to mount a Rack app in Rails I got the following Rack::Lint::LintError\r\n (Lint assertion):\r\n\r\n    session #<ActionDispatch::Request::Session:0x7f8466bfa3c8 not yet loaded> must respond to store and []=\r\n\r\nThis is because Rack::Lint expects session to respond to `store`. You could try monkey patching with something like:\r\n\r\n    class ActionDispatch::Request::Session\r\n      def store(name, value)\r\n        self[name] = value\r\n      end\r\n    end\r\n"}}