NO LONGER MAINTAINED - PLEASE USE THIS REPO INSTEAD: https://github.com/rails/sprockets-rails
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
sprockets-railsplugin sets up your Rails application for use with Sprockets. To install it, first install the
sprocketsRubyGem, then check out a copy of the
sprockets-railsrepository into your
vendor/plugins/directory. When you run the bundled
sprockets-railswill create two new directories in your application and copy a configuration file into your
sprockets-railsincludes a controller named
SprocketsControllerthat renders your application's Sprockets concatenation. When caching is enabled, e.g. in production mode,
SprocketsControlleruses Rails page caching to save the concatenated output to
public/sprockets.jsthe first time it is requested. When caching is disabled, e.g. in development mode,
SprocketsControllerwill render a fresh concatenation any time a source file changes.
sprockets-railsalso includes a set of Rake tasks for generating the concatenation (
rake sprockets:install_script) and installing provided assets (
rake sprockets:install_assets). Run
sprockets:install_assetsany time you add or update a Sprockets plugin in your application. Add
sprockets:install_scriptas a Capistrano post-deploy hook to generate the Sprockets concatenation on your servers automatically at deploy time.
Here's a walkthrough of the installation process:
gem install --remote sprockets
script/plugin install git://github.com/sstephenson/sprockets-rails.git
You now have
vendor/sprockets/directories in your application, as well as a
config/routes.rbfile to add routes for
ActionController::Routing::Routes.draw do |map| # Add the following line: SprocketsApplication.routes(map) ... end
Adjust your HTML templates to callinstead of .
sprockets-railsis installed, you can check out Sprockets plugins into the
vendor/sprockets/directory. By default,
sprockets-railsconfigures Sprockets' load path to search
vendor/sprockets/*/src/, as well as
Copyright © 2009 Sam Stephenson.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.