{"action":"created","issue":{"url":"https://api.github.com/repos/rails/web-console/issues/183","labels_url":"https://api.github.com/repos/rails/web-console/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/rails/web-console/issues/183/comments","events_url":"https://api.github.com/repos/rails/web-console/issues/183/events","html_url":"https://github.com/rails/web-console/issues/183","id":128663550,"number":183,"title":"config.middleware.insert_before \"WebConsole::Middleware\", \"MyMiddleware\" fails","user":{"login":"jclark42796","id":457340,"avatar_url":"https://avatars.githubusercontent.com/u/457340?v=3","gravatar_id":"","url":"https://api.github.com/users/jclark42796","html_url":"https://github.com/jclark42796","followers_url":"https://api.github.com/users/jclark42796/followers","following_url":"https://api.github.com/users/jclark42796/following{/other_user}","gists_url":"https://api.github.com/users/jclark42796/gists{/gist_id}","starred_url":"https://api.github.com/users/jclark42796/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclark42796/subscriptions","organizations_url":"https://api.github.com/users/jclark42796/orgs","repos_url":"https://api.github.com/users/jclark42796/repos","events_url":"https://api.github.com/users/jclark42796/events{/privacy}","received_events_url":"https://api.github.com/users/jclark42796/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-25T22:48:20Z","updated_at":"2016-01-26T00:31:03Z","closed_at":null,"body":"Not sure if this is a rack issue or web console issue or a \"Jim\" issue :).  Since this works:\r\ndevelopment.rb:\r\n```config.middleware.use \"MyMiddleware\"```\r\nand this works\r\n```config.middleware.insert_before \"Rails::Rack::Logger\", \"MyMiddleware\"```\r\nbut this doesn't\r\n```config.middleware.insert_before \"WebConsole::Middleware\", \"MyMiddleware\"```\r\nI'm posting to the web-console list.\r\n\r\n```\r\njclark:talon_app jclark$ rake middleware\r\nrake aborted!\r\nNo such middleware to insert before: \"WebConsole::Middleware\"\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/actionpack-4.2.5/lib/action_dispatch/middleware/stack.rb:125:in `assert_index'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/actionpack-4.2.5/lib/action_dispatch/middleware/stack.rb:88:in `insert'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/configuration.rb:68:in `block in merge_into'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/configuration.rb:67:in `each'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/configuration.rb:67:in `merge_into'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/engine.rb:501:in `app'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/application/finisher.rb:34:in `block in <module:Finisher>'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'\r\n/Users/jclark/dev/talon_app/config/environment.rb:5:in `<top (required)>'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/application.rb:328:in `require'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval'\r\n/Users/jclark/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `<main>'\r\n```\r\n\r\n```\r\nnic-jclark:talon_app jclark$ rake middleware\r\nuse Rack::Sendfile\r\nuse ActionDispatch::Static\r\nuse Rack::Lock\r\nuse #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007fd9e43aff00>\r\nuse Rack::Runtime\r\nuse Rack::MethodOverride\r\nuse ActionDispatch::RequestId\r\nuse Rails::Rack::Logger\r\nuse ActionDispatch::ShowExceptions\r\nuse WebConsole::Middleware\r\nuse ActionDispatch::DebugExceptions\r\nuse ActionDispatch::RemoteIp\r\nuse ActionDispatch::Reloader\r\nuse ActionDispatch::Callbacks\r\nuse ActiveRecord::Migration::CheckPending\r\nuse ActiveRecord::ConnectionAdapters::ConnectionManagement\r\nuse ActiveRecord::QueryCache\r\nuse ActionDispatch::Cookies\r\nuse ActionDispatch::Session::CookieStore\r\nuse ActionDispatch::Flash\r\nuse ActionDispatch::ParamsParser\r\nuse Rack::Head\r\nuse Rack::ConditionalGet\r\nuse Rack::ETag\r\nuse MyMiddleware\r\nrun TalonApp::Application.routes\r\n```\r\nThis didn't work under Ruby 2.2.0, Rails 4.2.1 and Web Console 2.2.1.  Upgraded to Ruby 2.2.2, Rails 4.2.5 and Web Console 3, but the above still doesn't work.  \r\n\r\nThanks,\r\nJim"},"comment":{"url":"https://api.github.com/repos/rails/web-console/issues/comments/174746930","html_url":"https://github.com/rails/web-console/issues/183#issuecomment-174746930","issue_url":"https://api.github.com/repos/rails/web-console/issues/183","id":174746930,"user":{"login":"jclark42796","id":457340,"avatar_url":"https://avatars.githubusercontent.com/u/457340?v=3","gravatar_id":"","url":"https://api.github.com/users/jclark42796","html_url":"https://github.com/jclark42796","followers_url":"https://api.github.com/users/jclark42796/followers","following_url":"https://api.github.com/users/jclark42796/following{/other_user}","gists_url":"https://api.github.com/users/jclark42796/gists{/gist_id}","starred_url":"https://api.github.com/users/jclark42796/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jclark42796/subscriptions","organizations_url":"https://api.github.com/users/jclark42796/orgs","repos_url":"https://api.github.com/users/jclark42796/repos","events_url":"https://api.github.com/users/jclark42796/events{/privacy}","received_events_url":"https://api.github.com/users/jclark42796/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T00:31:03Z","updated_at":"2016-01-26T00:31:03Z","body":"Perhaps this has not occurred yet?\r\n\r\nrailtie.rb\r\n```\r\ninitializer 'web_console.insert_middleware' do |app|\r\n      app.åmiddleware.insert_before ActionDispatch::DebugExceptions, Middleware\r\n end\r\n```"}}