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

Trouble adding Twitter Bootstrap to my Ruby on Rails project.

Hi everyone!

I'm trying to follow along the Build a Simple Ruby on Rails Application, with Jim Hoskins. And at about 9:00 in the video he adds twitter Bootstrap to the project.

So far I have followed exactly as he said. I'm guessing it's a problem with the version of Ruby or Rails that I have, (I believe that I'm using the latest version of both). Here is the error that I'm getting.

Any help is greatly appreciated.

Thank you all so much.

-Chase

8 Answers

I figured it out by adding the styles form the bootstrap.css to the scaffold.css.scss file. Thank you both so much for your time!

ok it may be an issue with the asset pipeline then. hmm. there is a bootstrap gem you can use. just include

gem 'bootstrap-sass', '2.3.2.0'

in your gem file and the version number you want (2.3.2 is whats used in the videos I think. then you can include the bootstrap css by including

@import "bootstrap";

at the top of your CSS file

Just to clarify. Put it in the application.css file, right?

Create a custom.css.scss and put it in there :)

can you post the line where you include bootstrap into your gemfile and where you include it in your css

All I did was drag and drop like in this video.

At about 9 mins.

can you post a screen shot of your css directory?

what version of rails are you using out of curiosity?

I'm using 4.0.2

Try adding it this way see if it works. here section 5.1.2 incase the link doesn't move to the section. :D

Okay. Thanks Stone Preston. That got me past the css error, but now I'm having problems with the next line. (The javascript.)