require 'sinatra' get '/hi' do "Hello World!" end. Put this in your pipe. $ gem install sinatra $ ruby hi.rb == Sinatra has taken the stage ... >> Listening on 0.0.0.0: ...
Link: sinatrarb.com
List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...
List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...
List of locals passed to the document. Handy with partials. Example: erb "<%= foo %>", :locals => {:foo => "bar"} default_encoding String encoding to use if uncertain. Defaults to settings.default_encoding . views Views folder to load templates from. Defaults to settings.views . layou...
# アプリケーションが http://example.com/example で動作している場合 get '/foo' do request.body # クライアントによって送信されたリクエストボディ(下記参照) request.scheme # "http" request.script_name # "/example" request.path_info # "/foo" request.port # 80 request.request_method # "GET" request.query_string # "" request.content_le...
How do I make my Sinatra app reload on changes? What are my deployment options? How do I use sessions? How do I use session-based flash? Can I run Sinatra under Ruby 1.9? How do I get the “route” for the current page? How do I access helpers from within my views? How do I render parti...
Ryan Tomayko (rtomayko) for constantly fixing whitespace errors 60d5006 Ezra Zygmuntowicz (ezmobius) for initial help and letting Blake steal some of merbs internal code. Chris Schneider (cschneid) for The Book, the blog, irclogger.com , and a bunch of useful patches. Markus Prinz (cy...
README Documentation Contribute Code Crew About Sinatra require 'sinatra' get '/hi' do "Hello World!" end Put this in your pipe $ gem install sinatra $ ruby -rubygems hi.rb == Sinatra has taken the stage ... >> Listening on 0.0.0.0:4567 and smoke it
New feature release, Contrib and Recipes By Konstantin Haase on Friday, September 30, 2011 We’re proud to announce two new releases today: 1.3.0 and 1.2.7. We’re also simultaneously releasing sinatra-contrib and would like to officially announce the recently launched Sinatra Recipes p...