Ich baue eine Site. Im Entwicklungsmodus dient es .js Dateien schön. jedoch unter dem Produktionsmodus, der folgende Fehler auftritt:Rails gibt .js mit dem MIME-Typ 'text/html' zurück
Refused to execute script from 'http://bowuzhi.herokuapp.com/javascripts/items.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
und der Gehalt an http://bowuzhi.herokuapp.com/javascripts/items.js ist html:
<div class='page-header'>
<a class="btn btn-primary" href="/zh-TW/items/new"><span class='glyphicon glyphicon-plus'></span>
New
</a><h1>Catalog</h1>
</div>
<div class='row' id='items'>
</div>
<div class='row'>
<div class='col-md-12'>
</div>
</div>
<script src="/javascripts/items.js"></script>
Diese Seite auf Heroku ist: http://bowuzhi.herokuapp.com.
Warum .js entpuppt sich als html?
Danke! Genau das gleiche Problem! –