Sinatra Cuba 3.0 Released

nouse · March 23, 2012 · Last by tablecell replied at August 11, 2020 · 3565 hits

http://cyrildavid.com/articles/2012/03/22/cuba-3.0-released

速度居然是 Sinatra 的 3 倍,马上装上玩玩。

Cuba -> 古巴?

#1 楼 @huacnlee 是古巴,经本人粗略测试,确实比 sinatra 还要快,准备拿它作一个 api 项目。

召唤 @night_song@Saito, 既然 sinatra 已经出现替代品了,sequel 也舍弃,直接用 Ohm 吧

Framework | LOC

Cuba | 152 Sinatra | 1476 Rails | 13181

http://files.soveran.com/cuba/#11

看起来不错,准备试试

感谢花花公子。马上试试。

cuba + ohm??

看起来的确不错,去用用

好东西,哥去看看

运行官网的 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 methodDelegateClass' for Rack::Session::Cookie:Class (NoMethodError)

You need to Sign in before reply, if you don't have an account, please Sign up first.