Search code examples
ruby-on-railsbootstrap-sass

ruby on rails tutorial chapter five - styling


I'm running through Michael Hartl's tutorial, and having reached the styling and layout chapter, seem to have got something wrong. Whereas in the tutorial, the site links are right aligned on a single line (like this http://railstutorial.org/images/figures/site_with_footer_bootstrap_4_0-full.png), I get them right aligned one beneath the other, and some (but not all) other styling elements missing.

I've tried updating gems.

Example code - _header.html.erb

<header class="navbar navbar-fixed-top navbar-inverse">
  <div class="navbar-inner">
<div class="container">
  <%= link_to "sample app", '#', id: "logo" %>
  <nav>
    <ul class="nav pull-right">
      <li><%= link_to "Home",    '#' %></li>
      <li><%= link_to "Help",    '#' %></li>
      <li><%= link_to "Sign in", '#' %></li>
    </ul>
  </nav>
</div>

I think this means that bootstrap is unhappy with something, but I can't tell what.

Thanks for reading this far :)


Solution

  • If you ever have questions regarding your code vs what it should be, try checking his repository first.

    https://github.com/railstutorial/sample_app_rails_4

    There he has a full working copy of the sample application.