Thursday, 15 January 2015

heroku - Why won't the Rails asset pipeline compile a CSS manifest when it's not called "application.css.scss"? -



heroku - Why won't the Rails asset pipeline compile a CSS manifest when it's not called "application.css.scss"? -

up until of application's css has been served through application.css.scss looks this:

/* ... *= require jquery-ui *= require_self *= require_tree . */ @import "bootstrap";

i needed create separate, stripped downwards manifest file serve single embeddable asset in our website. unfortunately though couldn't css file packaged , processed asset pipeline. kept getting set production url looked this:

<link href="/stylesheets/minimag.css" rel="stylesheet" />

rather should have looked fingerprinting , precompliation more like:

<link href="/assets/minimag-292d6edcd4fd2398abab273acf8.css" rel="stylesheet" /> on debugging discovered manifest has called application.css

there's chance i'm missing something. on stripping problem bare essentials looked @ application's stylesheet itself.

what found when called application.css.scss, compiled fine when name changed didn't processed:

so works:

application.html.haml

... = stylesheet_link_tag "application" ...

together stylesheet called application.css.scss. in production yields inclusion html:

... <link href="/assets/application-292d6edcd4fd6ec1da12b93fb273acf8.css" rel="stylesheet" /> ... but not work

application.html.haml

... = stylesheet_link_tag "testing" ...

together exactly same stylesheet renamed testing.css.scss. in production yields inclusion html:

... <link href="/stylesheets/testing.css" rel="stylesheet" /> ... what makes "application.css.scss" special?

why going on? why can't utilize manifest file has old name?

(if it's @ relevant i'm deploying heroku)

you have add together stylesheets precompilation if want utilize them standalone file.

# config/environments/production.rb # precompile additional assets. # application.js, application.css, , non-js/css in app/assets folder added. config.assets.precompile += %w(testing.css)

ruby-on-rails heroku asset-pipeline

No comments:

Post a Comment