# begin.rb #!/usr/bin/env ruby class Begin < Sinatra::Base get ‘/‘ do "index" end end
# config.ru require ‘rubygems‘ require ‘bundler‘ Bundler.require require ‘./begin‘ run Begin
# Gemfile source ‘http://ruby.taobao.org‘ gem ‘sinatra‘, :require => "sinatra/base"
原文:http://www.cnblogs.com/mfrbuaa/p/3892439.html