I want to server the 'excanvas.min.js' file only to the Internet Explorer and not to other browsers.
So I did in my application.html.erb
:
<!--[if lt IE 9]>
<%= javascript_include_tag 'excanvas.min'
# Excanvas for use of Canvas in IE up to version 8
%>
<![endif]-->
<%= javascript_include_tag 'application' %>
But I get the following error (in production):
Completed 500 Internal Server Error in 3ms
ActionView::Template::Error (excanvas.min.js isn't precompiled)
The error also happens when forcing Rails to precompile the file with
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
config.assets.precompile += %W(excanvas.min.js,other_file.css,even_anotherfile.js)
in 'config/production.rb'. What am I doing wrong?
I could do a
//= require excanvas.min
in the application.js
. But that would include the file for every browser...
Info: I made an update from an Rails 3.0-Application.