Bootstrap导航不起作用

时间:2015-03-23 02:08:41

标签: css twitter-bootstrap heroku

Navbar在localhost上正确显示:

https://dl.dropboxusercontent.com/s/9xqno903g60f3f0/2015-03-22%20at%207.01%20PM.png?dl=0

但是当我把它推到heroku时,我得到的东西没有相同的导航栏:

https://dl.dropboxusercontent.com/s/jjupo0xfxkyvm2f/2015-03-22%20at%207.01%20PM%20%281%29.png?dl=0

不确定发生了什么或者是否需要为heroku输入一些额外的命令以反映正确的导航栏更改。

日志说:

2015-03-23T01:51:38.865239+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/glyphicons-halflings-5737efb39ea936f62b6811688c4bb9f6.png")

,标题代码如下:

<nav class="navbar navbar-default">
   <div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
      <a class="navbar-brand" href="#">Pinteresting</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  <ul class="nav navbar-nav navbar-right">
    <li><%= link_to "Home", root_path %></li>
    <li><%= link_to "About", about_path %></li>
  </ul>
</div><!-- /.navbar-collapse -->

1 个答案:

答案 0 :(得分:0)

运行RAILS_ENV=production rake assets:precompile并将提交的更改部署到heroku。