Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

No such middleware to insert before: Rack::Lock (RuntimeError) #73

Open
jmuheim opened this issue Jan 5, 2017 · 1 comment
Open

No such middleware to insert before: Rack::Lock (RuntimeError) #73

jmuheim opened this issue Jan 5, 2017 · 1 comment

Comments

@jmuheim
Copy link

jmuheim commented Jan 5, 2017

I just upgraded to Rails 5, and I get this error:

=> Booting WEBrick
=> Rails 5.0.1 application starting in development on http://0.0.0.0:3001
=> Run `rails server -h` for more startup options
Exiting
/Users/josh/.rvm/gems/ruby-2.2.5@base/gems/actionpack-5.0.1/lib/action_dispatch/middleware/stack.rb:108:in `assert_index': No such middleware to insert before: Rack::Lock (RuntimeError)
	from /Users/josh/.rvm/gems/ruby-2.2.5@base/gems/actionpack-5.0.1/lib/action_dispatch/middleware/stack.rb:73:in `insert'

It's because I use better_errors gem. I have changed my config from

  config.middleware.insert_before Rack::Lock, Rack::LiveReload, no_swf:           true,
                                                                live_reload_port: 35729

to

  config.middleware.insert_before ActionDispatch::DebugExceptions, Rack::LiveReload, no_swf:           true,
                                                                                     live_reload_port: 35729

which seems to work.

In rack-livereload's README you still state to use Rack::Lock, maybe you should update it:

https://github.com/johnbintz/rack-livereload#readme

@ndbroadbent
Copy link

+1. It would be great if the README could be updated for Rails 5.

mlandauer added a commit to openaustralia/planningalerts that referenced this issue Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants