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 Build a Simple Ruby on Rails Application Frontend Development Installing Twitter Bootstrap

Eric Posen
Eric Posen
406 Points

Added latest Bootstrap.js/css files to proper folders but they aren't loading

I have put everything in the proper folder but when I refresh my statuses page all that loads is the following:

```<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" /> <script src="/assets/application.js?body=1" type="text/javascript"></script>

![Screenshot](http://i.imgur.com/bOO4Geb.png "Screenshot")

It's bootstrap v3.1.1. And yes the bootstrap.js file is in the javascripts folder.

I had a few problems with setting up bootstrap for the Treebook project aswell. What I ended up doing was just downloading the project files .zip from the right side of the video so I could move forward.

Eventually realized that it was my version of bootstrap that I kept trying to use (v3.1.1). Hope they can update this video for a more recent version of bootstrap. Still a great tutorial for Ruby.

Hope you get an answer soon!

Eric Posen
Eric Posen
406 Points

Andres,

I tried using the bootstrap files provided in the project files.zip but they still are not loading.

5 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Eric Posen,

This is a strange error that was fixed in later versions of rails. Open up your Gemfile and change the following:

gem 'rails', '3.2.6'

To:

gem 'rails', '3.2.17'

Then run bundle update and everything should work.

Eric Posen
Eric Posen
406 Points

That worked! Thank you so much.

Jamie Barton
Jamie Barton
14,498 Points

Can you share the contents of your application.css file?

Eric Posen
Eric Posen
406 Points

Just the following: /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require_self *= require_tree . */

Also, even the running a clone of the completed project, the bootstrap files do not load.

Eric Posen
Eric Posen
406 Points

Just the following:

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require_tree .
 */
Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey Eric Posen can you paste your generated application.css? You can do so by navigating to the page, clicking "View" -> "Developer" -> "View Source" and then clicking on application.css. If you have a link to your project up on github, that would be very helpful as well.

Eric Posen
Eric Posen
406 Points

Here is the generated application.css:

 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require_tree .
 */

This is my github project: https://github.com/goeric/treebook

Eric Posen
Eric Posen
406 Points

Here is the generated application.css:

 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require_tree .
 */

This is my github project: https://github.com/goeric/treebook