加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby – 当我尝试在我的sinatra应用程序中添加机架式闪光灯时,它

发布时间:2020-12-17 02:53:50 所属栏目:百科 来源:网络整理
导读:我一直在使用Rack :: Flash在我的Sinatra应用程序中显示响应的闪光通知.自从我升级到Sinatra 1.3.2后,应用程序崩溃,每当我向服务器发出请求时都会记录以下内容: !! Unexpected error while processing request: undefined method `' for nil:NilClass 简化
我一直在使用Rack :: Flash在我的Sinatra应用程序中显示响应的闪光通知.自从我升级到Sinatra 1.3.2后,应用程序崩溃,每当我向服务器发出请求时都会记录以下内容:

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

简化的代码如下所示:

require 'sinatra'
require 'rack-flash'

enable :sessions
use Rack::Flash

get "/" do
  "Hello World"
end

知道为什么会发生这种情况吗?

解决方法

rack-flash无法与最新版本的机架配合使用.请尝试 sinatra-flash.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读