SAIDI Belkacem
SAIDI Belkacem

Reputation: 348

Ruby/Sinatra app (file) does not run (start)

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/[email protected]/gems/sinatra-1.4.3/lib/sinatra/base.rb:1408:in `run!': undefined method `run' for HTTP:Module (NoMethodError)

from /home/belka/.rvm/gems/[email protected]/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

Upvotes: 4

Views: 2207

Answers (1)

SAIDI Belkacem
SAIDI Belkacem

Reputation: 348

I just needed to add this code, and my sinatra app is now alive:

set :server, 'webrick'

Upvotes: 5

Related Questions