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 trialChase Lee
29,275 PointsTrouble 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
Chase Lee
29,275 PointsI 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!
Stone Preston
42,016 Pointsok 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
Chase Lee
29,275 PointsJust to clarify. Put it in the application.css file, right?
Adam Sackfield
Courses Plus Student 19,663 PointsCreate a custom.css.scss and put it in there :)
Stone Preston
42,016 Pointscan you post the line where you include bootstrap into your gemfile and where you include it in your css
Chase Lee
29,275 PointsAll I did was drag and drop like in this video.
Chase Lee
29,275 PointsAt about 9 mins.
Stone Preston
42,016 Pointscan you post a screen shot of your css directory?
Stone Preston
42,016 Pointswhat version of rails are you using out of curiosity?
Chase Lee
29,275 PointsI'm using 4.0.2
Adam Sackfield
Courses Plus Student 19,663 PointsTry adding it this way see if it works. here section 5.1.2 incase the link doesn't move to the section. :D
Chase Lee
29,275 PointsOkay. Thanks Stone Preston. That got me past the css error, but now I'm having problems with the next line. (The javascript.)