Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing Bootstrap from Rails

I am having trouble removing Twitter Bootstrap from my Rails program.

I've tried starting from scratch without Bootstrap, but that seems to create a variety of problems.

EDIT: Yup, it's Twitter Bootstrap.

EDIT: I've been having some troubles with removing the twitter-bootstrap-rails gem from my current rails application. I installed the gem about a month ago when building my app (by editing my gemfile, altering my application.js file, and other such things), but now I've decided that I no longer want it. I tried to simply delete the gem from my gemfile and delete references to boostrap in application.js, but for some reason, bootstrap still gets compiled into my application.css file.

I'm guessing (perhaps incorrectly) that this is some sort of error associated with the rails asset pipeline, and I am unsure how to proceed. Any thoughts?

like image 427
Jack Bauer Avatar asked May 17 '12 07:05

Jack Bauer


2 Answers

If you've precompiled your assets since installing Bootstrap, you'll need to flush them or they will continue to be served.

To do this, run:

rake assets:clean

Essentially this cleans out compiled assets from the public/assets directory.

If you've removed the lines from application.css as @GorillaMcD suggested, cleaning the assets should complete the job.

like image 167
OzBandit Avatar answered Sep 21 '22 17:09

OzBandit


According to the documentation on github, for the css you also have to include a line in your application.css file:

/*
    *= require bootstrap_and_overrides
*/

Remove that and you should be good.

like image 36
GorrillaMcD Avatar answered Sep 21 '22 17:09

GorrillaMcD