I'm trying to write a Ruby web application and I want to use the functionality offered by Sinatra.
I used this code:
require 'rubygems'
require 'sinatra'
get '/' do
'Hello, world!'
end
I typed localhost:8080/?hello.rb in my browser and I received an error message that the script is unable to find sinatra. I also tried to run the sinatra app using this command:
ruby hello.rb
and this time it worked! So I suspect the problem is not in my code, but in the way I'm using G-WAN to serve the Ruby script.