Using index files with the Rails Asset Pipeline
I want to include one theme folder in my app https://github.com/usmanhalalit/charisma .
Like this doc http://guides.rubyonrails.org/asset_pipeline.html#asset-organization , I clone the theme folder in app / assets / charisma and put
config.assets.paths <Rails.root.join ("application", "assets", "charisma")
to my app config.
Then I create index.js and index.css for app / assets / charisma /:
/*
*= require_tree .
*/
//= require_tree .
Then I add //= require charisma
to my application.js, it gave an error: couldn't find file 'charisma'
when my application started
source to share
I finally figured out from this. In fact, I think there is a bug in the docs at http://guides.rubyonrails.org/asset_pipeline.html#using-index-files . The index files should be named library_name.css instead of index.css (in your case create /vendor/assets/charisma/charisma.css), then in your application.css you can call // = require charisma.
source to share