8

What is the consequential difference between adding

//= require bootstrap-sprockets

and

//= require bootstrap

to application.js?

The documentation says:

bootstrap-sprockets provides individual Bootstrap Javascript files (alert.js or dropdown.js, for example), while bootstrap provides a concatenated file containing all Bootstrap Javascripts

Does one offer better performance over the other, or something?

Roman Kiselenko
  • 43,210
  • 9
  • 91
  • 103
Touré Holder
  • 2,768
  • 2
  • 22
  • 20

2 Answers2

2

Require bootstrap over bootstrap-sprockets for faster compilation.

Require bootstrap-sprockets over bootstrap for ease of debugging.

While bootstrap-sprockets provides individual Bootstrap components for ease of debugging, you may alternatively require the concatenated bootstrap for faster compilation

https://github.com/twbs/bootstrap-rubygem#a-ruby-on-rails

cmititiuc
  • 660
  • 6
  • 14
1

Sometimes ago, I asked this question as to what sprockets means in rails. Which drew in two very good answers to throw more light into the topic for me.

I'm sure by the time you go through the answers, you will get more understanding.

Community
  • 1
  • 1
x6iae
  • 4,074
  • 3
  • 29
  • 50
  • 1
    Thanks. I think I get sprockets now. But rails apps seem run the same having required either bootstrap or bootstrap-sprockets in application.js. My question is what's the consequential difference. – Touré Holder Nov 01 '15 at 15:35