Rack-flash unreliable. Incompatible with Rack > 1.3.6
thehack opened this issue · 3 comments
thehack commented
The book recommends gem 'rack-flash' for session-based notifications, but rack-flash doesn't work with up-do-date versions of rack. The sinatra-authentication gem also requires rack-flash.
solutions:
- Downgrade to a version of Rack pre 1.3.6
Problem: It sets you up for more dependency problems. - Use 'sinatra/flash'
The author says the downside is that it does not work across different kinds of rack apps. - Sinatra could include this functionality itself?
- tl;dr Maybe the best short-term solution for the book is just to post a warning about rack-flash, or recommend 'sinatra/flash' instead.
learning commented
alternate for that is rack-flash3, check this out nakajima/rack-flash#8
thehack commented
Yeah, I had tried that and ran into something undesirable - I don't remember what. I ended up using sinatra/flash on recommendation of one of the core team. I guess that is what the book should be recommending.
zzak commented
For the time being, you can use rack-flash3
or sinatra-flash
gems.