ruby - Sinatra not running on localhost -


i have number of sinatra apps have worked fine in past. none of them load localhost. have entered same information in browser access them (http://localhost:4567), nothing comes up. page hangs long time...upwards of 5 minutes. kill process end it.

i tried webrick , thin, neither worked. here recent output webrick:

[2016-02-06 00:13:07] info  webrick 1.3.1 [2016-02-06 00:13:07] info  ruby 2.0.0 (2014-11-13) [x86_64-darwin14.0.0] == sinatra (v1.4.7) has taken stage on 4567 development backup webrick [2016-02-06 00:13:07] info  webrick::httpserver#start: pid=8118 port=4567 ^c== sinatra has ended set (crowd applauds) [2016-02-06 00:13:41] info  going shutdown ... 

the shutdown hangs after , ctrl-z, kill -9 [pid] stop it.

i've looked around quite bit on answers, i'm still stuck. wasn't able find webrick log in /var/log folder, wasn't sure start looking errors. driving me crazy because know apps working fine before , need write new sinatra app quickly.

the thing has changed updated gem 2.5.0...it's possible problem, wasn't able find evidence of other people encountering problem gem.

has run before? if not, suggestions on can see error log?

let's start simple, happens when write , run following application in test.rb:

require 'sinatra'  '/hi'     "hello world!" end 

then gem install sinatra , ruby test.rb. should see along these lines:

== sinatra (v1.4.7) has taken stage on 4567 development backup thin thin web server (v1.6.3 codename protein powder) maximum connections set 1024 listening on localhost:4567, ctrl+c stop 

now in second terminal run curl:

$ curl -xget localhost:4567 <!doctype html> <html> <head>   <style type="text/css">   body { text-align:center;font-family:helvetica,arial;font-size:22px;     color:#888;margin:20px}   #c {margin:0 auto;width:500px;text-align:left}   </style> </head> <body>   <h2>sinatra doesn&rsquo;t know ditty.</h2>   <img src='http://localhost:4567/__sinatra__/404.png'>   <div id="c">     try this:     <pre>get &#x27;&#x2f;&#x27;   &quot;hello world&quot; end </pre>   </div> </body> </html> 

can , post result of curl session?


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -