For my last Raspberry Pi Project I tried some Webframeworks. The Sinatra Framework is an simple an quite elegant Webframework for Ruby.
As preparations you have to Install the folowing Raspbian/Debian Packages:
apt-get install ruby ruby-dev
Ruby requires the following Gems:
sudo gem install sinatra sudo gem install thin sudo gem install i2c
If everything went fine during your Installation process, you’ve to write only a few lines of code:
# sinatra.rb require 'sinatra' set :port, 8080 get '/hi' do "Hello World!" end
After saving this file your Website is ready to run. Just start it.
Now you can visit your First „Hello World“ Page on http://raspberrypi:8080.