有問題的寶石是async_sinatra。我安裝了它,跑捆綁它也安裝在Gemfile中,但我不斷收到同樣的錯誤:加載async_sinatra gem,但我的程序沒有找到它的方法
NoMethodError: undefined method 'aget' for main:Object
反正來幫助解決這一問題?
注意:我正在運行最新的Sinatra,並且正在使用Thin webserver,並運行JRuby 1.6.7。
,我們所使用的示例代碼:
require 'sinatra/async'
class AsyncTest < Sinatra::Base
register Sinatra::Async
aget '/' do
body "hello async"
end
end
run AsyncTest.new
你需要它的應用程序? –
是的,用'require「sinatra/async」' – Imnotanerd
只是檢查:) –