When I try to add a frame stop to my sinatra application, it stops working

I used Rack::Flash for a while to display error notifications in responses in my Sinatra applications. Since I upgraded to Sinatra 1.3.2, the application crashes by logging the following when I make a request to the server:

 !! Unexpected error while processing request: undefined method `<<' for nil:NilClass 

The simplified code is as follows:

 require 'sinatra' require 'rack-flash' enable :sessions use Rack::Flash get "/" do "Hello World" end 

Any idea why this might happen?

+4
source share
1 answer

rack-flash does not work with the latest versions of the rack. Instead, try sinatra-flash .

+8
source

Source: https://habr.com/ru/post/1395681/


All Articles