We've just hit this in production in 3.1.1, with the following line of code:
<%= javascript_include_tag "jquery.signaturepad" %>
Even though jquery.signaturepad.js appears in our manifest.yml, the code raises an AssetNotPrecompiledError.
The problem is that Sprockets::Helpers::RailsHelper::AssetPaths.rewrite_extension does not append the '.js' extension to the source unless File.extname(source).empty?
Obviously the fix for us is trivial; just manually add the '.js' extension. However, this is counter-intuitive, as manifest files such as the one below work just fine without needing to be explicit about the extension:
//= require jquery.autocomplete
//= require jquery.form
//= require jquery.remotipart
//= require jquery.placeholder
Perhaps the extension could be added if File.extname(source) != ext, or perhaps javascript_include_tag could try both versions (with and without the extension), and fail only if both aren't present?