Everything works fine when I run locally, but fails when I push to heroku. I've discovered that I need to modify all of the .css files in app/assets/stylesheets/
to have .css.scss
extensions and ensure my Gemfile contains:
gem 'sass-rails', '4.0.1'
group :production, :staging do
gem 'rails_12factor' # for heroku
end
Within my .css.scss
files, I now use image-url()
instead of url()
to point to the fingerprinted image (fingerprinted and reorganized by heroku and asset compilation business).
in app/views/layouts/mycontrollername.html.erb
:
<head>
...
<%= stylesheet_link_tag "path/to/css/file" %>
</head>
But I still can't find the right path. When I look at the source, I see the path I expect except for the fingerprint: path/to/css/file.css
instead of path/to/css/file-somemd5hash.css
. Note that the path does NOT include assets/path/to/css/file.
http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets
EDIT
I've confirmed that there are no compiled css files on heroku in public/assets/. There is one application.js file (it's empty) even though I have a .js.coffee file for each controller. I have NO application.css, only a .css for each controller.