A simple way to put a basic form up as a web site is Sinatra. The following is a web app in a single file, using Sinatra.
#!/usr/bin/env ruby
require 'sinatra'
get '/' do
erb :guess
end
post '/' do
@guess = params[:guess].to_i
if @guess == 10
@message = "Correct!"
else
@message = "Try again..."
end
erb :guess
end
__END__
@@ layout
<html>
<body>
<%= yield %>
</body>
</html>
@@ guess
<form action="" method="post">
<p>Guess a number: <input type="text" name="guess"/></p>
<p><%= @message %></p>
</form>
Install the sinatra gem and run the file. You'll see a message like
== Sinatra/1.3.3 has taken the stage on 4567
Then point your browser at http://localhost:4567/
and your app is online.