lagotto / alm-report

ALM Reports
http://almreports.plos.org/
MIT License
8 stars 3 forks source link

Error handling missing png image #88

Closed mfenner closed 10 years ago

mfenner commented 10 years ago
Started GET "/assets/sprite.png"
Processing by ApplicationController#routing_error as PNG
INFO -- :   Parameters: {"path"=>"assets/sprite"}
INFO -- : Completed 500 Internal Server Error in 2ms
FATAL -- : 
ActionView::MissingTemplate (Missing template static_pages/page_not_found with {:locale=>[:en], :formats=>[:png], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :slim, :coffee]}. Searched in:
  * "/var/www/alm_report/releases/20141107185939/app/views"
):
  app/controllers/application_controller.rb:28:in `page_not_found'
mfenner commented 10 years ago

I think there are two things happening here:

jure commented 10 years ago

I see, the GET /assets/sprite.png is coming from the CSS: https://github.com/articlemetrics/alm-report/blob/visualizations/app/assets/stylesheets/content.scss#L91

Fixed the reference by using the assets pipeline friendly image-path.

mfenner commented 10 years ago

Hm, just did a pull request doing the same. There are also two other minor changes for Rails 4 in there (eager_load and not rescueing routing errors).