sinatra up and running速记

gem install sinatra
(sinatra-1.4.5, rack-1.5.2)

gem intall thin ( order: Thin-1.6.2 -> Mongrel -> WEBrick)
Hello world!
#ruby server.rb -p port_num
require 'sinatra'
get '/' do
"Hello, world!"
end

http://localhost:4567


,...
reading..
没有任何ruby经验看这本书会比较吃力, 转读 Programming Ruby 1.9 & 2.0 中.

你可能感兴趣的:(sinatra up and running速记)