I’m trying to use the Espresso framework, but I’m having problems in the “hello world” example.
I’ve implemented this code:
require 'e'
class App < E
def hello
"Hello World!"
end
end
App.run
When I run the command ruby hello.rb, I get this:
[2012-08-15 20:54:55] INFO WEBrick 1.3.1
[2012-08-15 20:54:55] INFO ruby 1.9.3 (2012-04-20) [i386-mingw32]
[2012-08-15 20:54:55] WARN TCPServer Error: Normalmente é permitida apenas uma utilização de cada endereço de soquete (protocolo/endereço de rede/porta). - bind(2)
[2012-08-15 20:54:55] INFO WEBrick::HTTPServer#start: pid=6460 port=80
It seems it is booting up properly but when I try to acess the URL localhost:80/hello, it just doesn’t work. I get a “Not Found: /hello”, and in the console the output is:
[15/Aug/2012:20:56:47] "GET /hello HTTP/1.1" 404 17
- -> /hello
Can anybody tell me why this isn’t working?
Im pretty sure it should be: