Reputation: 356
I am confused about which one of these two is the actual sprocket gem for rails? Which one should I be using? Whats the difference between the two?
sprockets-rails: https://github.com/rails/sprockets-rails
sprockets: https://github.com/sstephenson/sprockets
Upvotes: 6
Views: 1343
Reputation: 356
The "sprockets" gem is for use in generally any ruby apps.
"Sprockets-rails" is like a wrapper around the "Sprocket" gem for use specifically for rails apps. The part of the name after the "-" dash means that its specific for certain frameworks/environments/gems..
For example. Other than sprocket-rails, there is also a wrapper for Sinatra called 'sprocket-sinatra', which is also a web application framework like rails. .
The same naming convention can exist for all gems, for example, the BDD testing framework cucumber.
You may find cucumber-rails, cucumber-js, cucumber-sinatra... etc –
Upvotes: 2
Reputation: 1892
The sprockets-rails
includes rails based functionality and rake tasks.
In all current versions of Rails (beginning with 3.1), your Sprockets environment is automatically mounted at /assets.
Sprockets
can be used in conjunction with a Rack app. See: https://github.com/rack/rack for more information regarding Rack apps.
Upvotes: 4