h2. Sinatra is the easiest way to a Fast, RESTful, web-application in Ruby with few dependencies, setup, and LOC. h3. Installation sudo gem install sinatra h3. Your first Sinatra app require "rubygems" require "sinatra" get '/' do "Hello World" end Run your app with $ ruby myapp.rb and point your browser to http://localhost:4567 h3. Bleeding Edge # cd where/you/keep/your/projects # git clone git://github.com/bmizerany/sinatra.git # cd sinatra # git submodule init && git submodule update # cd your_project # ln -s ../sinatra at the top of your sinatra.rb file $:.unshift File.dirname(__FILE__) + '/sinatra/lib' require 'sinatra' get '/about' do "All good in the hood" end h3. More stuff * "Famous quotes about Sinatra":/Quotes * "Frequently Asked Questions":/FAQ * "Apps using Sinatra":/SinatraInTheWild h4. Killer resources! * "Rest-client":http://rest-client.heroku.com/rdoc/ * "Using for facebook apps":http://deadprogrammersociety.blogspot.com/2008/04/frankie-goes-to-facebook.html * "Blogs talking about Sinatra":/Blogs h5. Sources * *The latest source* and README is "here":http://github.com/bmizerany/sinatra * *IRC*: irc.freenode.net #sinatra * *Mailing List*: "http://groups.google.com/group/sinatrarb":http://groups.google.com/group/sinatrarb * *Sinatra Bugtracker* at Lighthouse: "http://sinatra.lighthouseapp.com/":http://sinatra.lighthouseapp.com
sudo gem install sinatra
require "rubygems" require "sinatra" get '/' do "Hello World" end
$ ruby myapp.rb
http://localhost:4567
cd where/you/keep/your/projects
git clone git://github.com/bmizerany/sinatra.git
cd sinatra
git submodule init && git submodule update
cd your_project
ln -s ../sinatra
sinatra.rb
$:.unshift File.dirname(__FILE__) + '/sinatra/lib' require 'sinatra' get '/about' do "All good in the hood" end
or cancel
© 2007 Blake Mizerany | powered by git-wiki which is powered by Sinatra and git