4

I'm using: ruby-1.9.3-p392 and sinatra-1.4.3.

when I run my file, I got this errors:

/home/belka/.rvm/gems/ruby-1.9.3-p392@Rails3.2.13/gems/sinatra-1.4.3/lib/sinatra/base.rb:1408:in `run!': undefined method `run' for HTTP:Module (NoMethodError)

from /home/belka/.rvm/gems/ruby-1.9.3-p392@Rails3.2.13/gems/sinatra-1.4.3/lib/sinatra/main.rb:25:in `block in <module:Sinatra>'

my code is the simplest code for a sinatra newbie (hello.rb):

require 'rubygems'
require 'sinatra'

get '/' do
    'Hello World!'
end
4

1 回答 1

5

我只需要添加这段代码,我的 sinatra 应用程序现在就可以运行了:

set :server, 'webrick'
于 2013-07-06T22:34:39.427 回答