Skip to content

Instantly share code, notes, and snippets.

@sowawa
Created February 7, 2012 02:04
Show Gist options
  • Save sowawa/1756617 to your computer and use it in GitHub Desktop.
Save sowawa/1756617 to your computer and use it in GitHub Desktop.
Sinatra

This is ruby practice using sinatra.

cd
rvm 1.9.2
rvm gemset create sandbox
rvm 1.9.2@sandbox
git clone git://gist.github.com/1756617.git sinatra
cd sinatra
gem install sinatra
ruby app.rb -p 3000 2>&1 > /dev/null &
curl localhost:3000/
# Welcome, Rackhub.
ps aux | grep app.rb | head -1 | awk '{print $2}'|xargs kill -9
require 'sinatra'
get '/' do
content_type :text
'Welcome, Rachub.'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment