意外的Sinatra 404 GET错误

时间:2015-02-09 21:56:15

标签: twitter-bootstrap twitter-bootstrap-3 sinatra thin

运行经典' Sinatra app on Thin(1.6.3)。

页面看起来很好,但后来我注意到了:

127.0.0.1 - - [09/Feb/2015:15:39:08 -0600] "GET / HTTP/1.1" 200 2869 0.0028
127.0.0.1 - - [09/Feb/2015:15:39:08 -0600] "GET /css/bootstrap.min.css HTTP/1.1" 304 - 0.0009
127.0.0.1 - - [09/Feb/2015:15:39:08 -0600] "GET /... HTTP/1.1" 404 440 0.0011
127.0.0.1 - - [09/Feb/2015:15:39:08 -0600] "GET /js/bootstrap.min.js HTTP/1.1" 304 - 0.0007

此行("GET /... HTTP/1.1" 404)适用于所有路线,而不仅仅是/

为什么我收到此消息?省略号...在这种情况下代表什么?

本地(CSS,JS)和远程资源(ajax.googleapis.com)似乎都正确加载。

路线:

get '/' do
  erb :'/home'
end

观点:

<div class="page-header">
  <h1>Home</h1>
</div>

<blockquote><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit.</p></blockquote>

布局:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">    
    <link href="/css/bootstrap.min.css" rel="stylesheet">    
  </head>
  <body>
    <div class="container">
      <%= yield %>
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>    
  </body>
</html>

0 个答案:

没有答案