Note that there are some explanatory texts on larger screens.

plurals
  1. POReferenceError: is not defined
    primarykey
    data
    text
    <p>After I deploy my project on Heroku, I get for the following code in Firebug this error: </p> <p>ReferenceError: SirTrevor is not defined</p> <pre><code>&lt;script type="text/javascript" charset="utf-8"&gt; $(function(){ var instances = $('.sir-trevor-area'), l = instances.length; while (l&gt;=2) { instance = $(instances[l]); new SirTrevor.Editor({ el: instance, blockTypes: ["Video"], defaultType: "Video" }); l--; }; while (l&gt;=1) { instance = $(instances[l]); new SirTrevor.Editor({ el: instance, blockTypes: ["Embedlylink"], defaultType: "Embedlylink" }); l--; }; while (l&gt;=0) { instance = $(instances[l]); new SirTrevor.Editor({ el: instance, blockTypes: ["Heading", "Text", "Image", "Video", "Embedly"], defaultType: "Text" }); l--; }; }); &lt;/script&gt; </code></pre> <p>Firebug highlights this line "</p> <pre><code>new SirTrevor.Editor({ el: instance, blockTypes: ["Heading", "Text", "Image", "Video", "Embedly"], defaultType: "Text" }); </code></pre> <p>"</p> <p>On localhost everything seems fine, no errors. Anyone an idea what the problem could be? Thank you so much for your help! Really appreciated!</p> <p>UPDATE:</p> <p>SirTrevor is defined in sir-trevor.js which is successfully loaded via the Rails asset pipeline in the application.js file.</p> <p>This is my application.js file:</p> <pre><code>//= require jquery //= require jquery_ujs //= require sir-trevor //= require underscore.js //= require eventable.js //= require twitter/bootstrap //= require jquery.sidr.js //= require_tree . </code></pre> <p>Before push to Heroku I do "rake assets:precompile" . On localhost everything seems fine.</p> <p>The application.html.erb header:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Tt&lt;/title&gt; &lt;%= stylesheet_link_tag "application", :media =&gt; "all" %&gt; &lt;link href="//netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.css" rel="stylesheet"&gt; &lt;%= javascript_include_tag "application" %&gt; &lt;%= csrf_meta_tags %&gt; &lt;/head&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload