sinatra app doesn't start on run
问题 I'm on Ubuntu 10.10/Ruby 1.9.2 Whatever I do, I can't get a sinatra app to start on my local machine. hello.rb: require 'sinatra' get '/' do "Hello World!" end "$ ruby hello.rb" and "$ ruby -rubygems hello.rb" both result in a new prompt with no action taken. Any tips or pointers? 回答1: This is a known issue in Sinatra 1.0 running on Ruby 1.9.2 ; it has been fixed in Sinatra 1.1 which is just around the corner. Fix it with enable :run : require 'sinatra' enable :run get '/' do "Hello World!"