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

Unsuccessful in Adding Twitter Bootstrap to my Rails Project.

Hi Everybody!

I'm trying to add Twitter Bootstap to my rails project and so far I'm having no luck.

To sum up what I've done to try to install it I have added bootstrap to my assets folder and put:

/*
*=require twitter/bootstrap
*/

To application.css

gem 'less-rails-bootstrap'

To my Gemfile. And this is what I got.

4 Answers

Try to remove app/assets/stylesheets/application.css

If it doesn't work take a look at this thread: http://stackoverflow.com/questions/7462661/sprocketscirculardependencyerror-in-storeindex

Thank you Bernardo Simões! That took away the error. Unfortunately none of the styles that Ive added are applying now. Do you have any advice on that?

Chase James, recreate the application.css and add only the:

 /*
*=require twitter/bootstrap
*/

see if it ouputs any errors... then go adding the other dependencies in order to know where the problem is coming from. it is probably coming from the:

 /*
*=require_tree . 
*/

Thank you Bernardo Simões. It appears that /* *=require twitter/bootstrap */ is my problem. Any further advice would be greatly appreciated.

Actually I think it's the file it's self. When I remove all code it still gives me the same error.

is there anyway that I can clone your repo, and try to understand what is happening? It s quite hard to debug like this :p

Thanks Bernardo. My dad wants me to work on a different project. So I think I'll abandon it for a while. Thanks for your help!

Try just with *= require twitter/bootstrap and not to add the comments with it.

Should be in app/assets/stylesheets/application.css

Still nothing...Thanks for the help anyway.

I think you're requiring bootstrap in multiple locations. Try removing it in another location (maybe you're importing it in a stylesheet) or remove it from your application.css file:

/*
*=require twitter/bootstrap
*/