2012-03-15 46 views
1

我在運行我的web應用程序時遇到問題。它啓動後就好了,但每當我提出一個要求薄胡扯了,我得到以下日誌中彈出:超薄拋出錯誤:未定義方法「調用」

>> Listening on 0.0.0.0:3000, CTRL+C to stop 
!! Unexpected error while processing request: undefined method `call' 
    for #<Rack::Request:0x7f104facb640> 

這種配置的工作我的Debian服務器上就好了;我現在正在運行Gentoo。

這是我rackup文件:

require 'toto' 
# Rack config 
use Rack::Static, :urls => ['/css', '/js', '/images', '/favicon.ico', '/pubkey.asc'], :root => 'public' 
use Rack::Request 
use Rack::CommonLogger 
if ENV['RACK_ENV'] == 'development' 
    use Rack::ShowExceptions 
end 
# 
# Create and configure a toto instance 
# 
toto = Toto::Server.new do 
# 
# Add your settings here 
# set [:setting], [value] 
# 
set :author, "jibcage"        # blog author 
set :title,  "Going to Grass"     # site title 
set :root,  "index"         # page to load on/
# set :date,  lambda {|now| now.strftime("%d/%m/%Y") } # date format for articles 
set :markdown, :smart 
+0

我們可以看到它處理你的請求的Web應用程序的代碼? – 2012-03-15 14:28:36

+0

我在頂部添加了我的rackup文件。 – jibcage 2012-03-15 15:47:32

回答

0

刪除線

use Rack::Request 
+0

我會這樣做,但我需要Rack :: Request來獲得我的一些代碼。 – jibcage 2012-03-15 16:09:25

+0

'Rack :: Request'不是'Rack'中間件。 – Reactormonk 2012-03-15 16:11:00

相關問題