Running a Ruby Server has never been easier
May 6th, 2008What?
Sinatra - the sleekest ruby server out there. Very appropriately named
Why?
I have a good friend who’s learning to program - we started with ruby, and are now venturing into the messy world of html/css/javascript.
One of the biggest challenges in getting started with this stuff is to *get started.* Installation of Apache is not necessarily difficult, but if you want more dynamic scripting (say ruby), things can get messy.
Sinatra makes it super easy.
How?
Super easy. Just:
sudo gem install sinatra
echo "require 'rubygems'; require 'sinatra'" > sinatra-server.rb
ruby sinatra-server.rb
# == Sinatra has taken the stage on port 4567 for development
That’s it. now go enjoy sinatra at http://localhost:4567.

To handle a request, simply edit your sinatra-server.rb file:
require 'rubygems'
require 'sinatra'
get "/:name" do
"Hello #{params[:name]}!"
end
Find more details in this great Sinatra tutorial.
May 20th, 2008 at 3:47 am
Hello my friends

December 10th, 2009 at 5:59 pm
Wave Invites…
What a refreshing topic! I really enjoyed your point of view and can’t wait to read some of your upcomming posts. I’m going to link to your blog if you don’t mind as I think my readers might find some value in your topics….