Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstalling Twitter Bootstrap from a Rails app

I recently installed Twitter Bootstrap in my Rails app via the following two steps:

rails g bootstrap:install

(this included Twitter Bootstrap to my app's asset pipeline)

rails g bootstrap:layout application fixed

(this generated a layout for me, by default application.html.erb and fixed layout was generated)

Should I do any of the following or all of it to remove Twitter Bootstrap completely from my app?

  1. Delete all the files added by it in APP folder?

    • javascripts/bootstrap.js.coffee

    • stylesheets/bootstrap.js.coffee

    • layout/application.html.erb (edit this file?)

  2. Are there other files that were created that I missed and must also remove?

like image 831
edweezy Avatar asked May 17 '12 16:05

edweezy


2 Answers

Try this

rails destroy bootstrap:install

Also, remove the gem from your gemfile

gem "twitter-bootstrap-rails"

like image 167
RohitPorwal Avatar answered Nov 15 '22 12:11

RohitPorwal


If you look at the github repo for this you can see the generators and what exactly they do:

https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap

The command

rails g bootstrap:install

Uses the templates here: https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap/install/templates

The layout command uses the templates here: https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/lib/generators/bootstrap/layout/templates

Also, remove the gem from your gemfile

gem "twitter-bootstrap-rails"
like image 4
Matt Smith Avatar answered Nov 15 '22 14:11

Matt Smith