Bummer! You have been redirected as the page you requested could not be found.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Bootstrap nav bar won't show up in Rails

I can't get the bootstrap nav bar to show up on my site. There is only the marker text where the bar should be.

imgur

And if I hover the cursor over the "all statuses" area, it turns gray, but not even the whole width of the screen (only like 70 %)

I even tried copy pasting the application.html.erb file from the site to my app, to no avail. Then tried replacing the whole thing, still didn't work (replacing with the .zip.)

3 Answers

Note that if you downloaded Bootstrap 3, that they changed the navbar a bit. I would check documentation. Bootstrap 2.2 is what's used on these videos.

Same as Brandon mention check the navbar page. I believe you are missing a nav class

<nav class="navbar navbar-default navbar-fixed-top" role="navigation"> ... </nav>

I had the same issue, and for some reason (from what I could find, after checking that my code was indeed correct) inspecting the element made it look like the bootstrap.css file wasn't loading all the way, it only loaded a portion of it. I'm not sure how that happened, but when I would check the file in Network, open it in a new tab, the css file ended before the classes that defined the nav styling.

I restarted the entire project, used the bootstrap.min.css file instead, and now the nav works. Before you restart, maybe try using the minified css file instead of the bootstrap.css file?

Also, inspect the page and make sure the css files are loading correctly... and maybe even check to see if the file is loading all the way.