Sinatra
Upcoming SlideShare
Loading in...5
×
 

Sinatra

on

  • 2,963 views

This is a slide of lightning talk session of OSDC.tw 2009. In this slide, we'll show you some example, and deployment tips & tricks on passenger(mod_rails), heroku and Google .

This is a slide of lightning talk session of OSDC.tw 2009. In this slide, we'll show you some example, and deployment tips & tricks on passenger(mod_rails), heroku and Google .

Statistics

Views

Total Views
2,963
Views on SlideShare
2,955
Embed Views
8

Actions

Likes
2
Downloads
55
Comments
1

3 Embeds 8

http://www.slideshare.net 6
http://webcache.googleusercontent.com 1
http://www.linkedin.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Sinatra Sinatra Presentation Transcript

  • Sinatra Zero & XDite
  • Make Ur Calendar Icon
  • Yes, Make our own!
  • BA
  • UUDDLRLRBA
  • • Full-time student • Works in hypo itsZero • http://itszero.org/ • http://twitter.com/itszero
  • ...
  • Sinatra + RMagick
  • #!/usr/bin/ruby require 'rubygems' require 'sinatra' require 'RMagick' include Magick   FONTPATH = File.dirname(File.expand_path(__FILE__)) + quot;/ Aller/Aller_Bd.ttfquot;   get '/' do   open('public/index.html').read end   get '/gen_icon' do   headers['Content-Type'] = 'image/png'   [some nasty RMagick code...]     canvas.format = 'png'   canvas.to_blob end  
  • http://makeyourcalicon.heroku.com http://tr.im/j9DH
  • Another Example Oh, Dear Mr IE6...
  • PHP / CodeIgniter ?
  • debug ... by XDite
  • require ‘twitter_search’
  • require 'rubygems' require 'sinatra' require 'twitter_search' get '/' do @client = TwitterSearch::Client.new 'politweets' @results = @client.query :q => '@MrIE6' erb :home end
  • 10 !
  • db & paginate
  • activerecord will_paginate
  • 40
  • Deployment!
  • Passenger •( ) Ruby mod_php • Supports Rack!
  • Rack Handler Adapters • Mongrel • Camping • WEBrick • Sinatra • FastCGI • Merb • Passenger •... •...
  • Sinatra on Passenger 1 require 'rubygems' 2 require 'sinatra' 3 4 Sinatra::Application.default_options.merge!( 5 :run => false, 6 :environment => :production 7 ) 8 9 require 'make_your_cal_icon.rb' 10 run Sinatra::Application 11 => config.ru
  • Java on GAE
  • JRuby + Sinatra + GAE
  • URLFetching Bumble Will_paginate
  • http://gae.mrie6.com http://tr.im/j9DK