2012-03-15 45 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

相关问题