So, I just realised that I have absolutely no Idea what Sprockets are in rails.
when using either bootstrap, or materialize, it is requested to include the sprocket
(bootstrap-sprocket or materialize-sprocket) in the application.js
file.
Everything I search talks about the asset pipeline and confuses me the more.
According to ruby-guides,
The asset pipeline is technically no longer a core feature of Rails 4, it has been extracted out of the framework into the sprockets-rails gem.
and when I did bundle show sprockets-rails
, I got:
/Users/Sunday/workspace/resilience/vendor/bundle/ruby/2.1.0/gems/sprockets-rails-2.3.1
which shows that I have the gem, at least.
But my confusion and my question is that what is the importance of sprockets
, as opposed to sprockets-rails
that made other gems like bootstrap
and materialize
and probably some others to have sprockets
, especially in their javascript files?
Thanks.