Got small problem with first exercise from first screencast.
Here is the code for exercise:
get '/:hash' do url = @shorten.lookup(params[:hash]) redirect url.url end
Final line redirects me to http://0.0.0.0:4567/example.com instead of http://example.com
And I see this sinatra page
Try this: get '/example.com' do "Hello World" end
I’ve tried original code from screencast and got the same result. My sinatra version is 0.9.0.4, ruby 1.8.6, mac os x
So I wonder, why my behavior is differ from your results. Do you have any idea?