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

Open
opened 2017-01-05 19:44:42 +00:00 by jmuheim · 1 comment
jmuheim commented 2017-01-05 19:44:42 +00:00 (Migrated from github.com)

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

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 commented 2017-04-03 17:57:50 +00:00 (Migrated from github.com)

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

+1. It would be great if the README could be updated for Rails 5.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/rack-livereload#73
No description provided.