http://cyrildavid.com/articles/2012/03/22/cuba-3.0-released
速度居然是 Sinatra 的 3 倍,马上装上玩玩。
运行官网的 hello world 直接报错 undefined methodDelegateClass' for Rack::Session::Cookie:Class
require "cuba"
require "cuba/safe"
Cuba.use Rack::Session::Cookie, :secret => "__a_very_long_string__"
Cuba.plugin Cuba::Safe
Cuba.define do
on get do
on "hello" do
res.write "Hello world!"
end
on root do
res.redirect "/hello"
end
end
end
Ruby27/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/cookie.rb:155:in <class:Cookie>': undefined method
DelegateClass' for Rack::Session::Cookie:Class (NoMethodError)