|Related to : sprockets - precompiling a standalone asset|
|Asset pipeline with rails/sprockets & bower|
config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif *.ico)
config.assets.paths << Rails.root.join('vendor', 'assets',
'bower_components', 'bootstrap-sass-official', 'assets', 'fonts')
config.assets.precompile << %r(.*.(?:eot|svg|ttf|woff)$)
config.assets.precompile = ['*.js', '*.css', '*.css.erb']
This last line overwrites the previous two lines which add the image
assets to prec
|What is the difference between sprockets-rails and sprockets gem?|
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
|Requiring a sprockets-preprocessed file with Browserify and browserify-rails|
I’ve spent endless hours on integrating browserify-rails in my
project and making JS Routes work within this setup…
The solution I came to and described below is the result of me not
being able to have Sprockets pre-process my routes file before
Browserify would come in. I have spent quite some time in both the
source code of browserify-rails and sprockets but couldn't find a way
to turn thin
|Asset pipeline undefined variable|
*= require_tree .
otherwise, you load everything twice and also there is no chance to
load it in the correct order. rails just load it in a "random" way and
then u most of the time run into errors.
|Can we use asset html files in Alert dialog?|
try this way,
InputStream is = getAssets().open("yourhtmlfile.txt");
// We guarantee that the available method returns the
// size of the asset... of course, this does mean that a
// asset can't be more than 2 gigs.
int size = is.available();
// Read the entire asset into a local byte buffer.