I'm having a problem where the asset tag time stamp is not being applied when image_path
is used. As a result, the image is not displayed. This only happens when I push to heroku.
code:
<%= image_path 'notebook.png' %>
localhost result:
/images/notebook.png?1284326123
Heroku result:
/images/notebook.png
Heroku push output:
-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.0
All dependencies are satisfied
Compiled slug size is 15.4MB
-----> Launching.... done
image_tag
works just fine. I suspect rails3_serve_static_assets
is at fault. Any ideas?
UPDATE
A check of Heroku filesystem shows that Notebook.png does exist.
$ heroku console
Ruby console for myapp.heroku.com
>> `ls public/images`
=> "<bunch of files>\nNotebook.png\n<bunch of other files>"
And there's the problem. My code was referencing 'notebook', where the file was called 'Notebook'. Apparently localhost is more permissive than Heroku.