Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy jQuery won't be working?
    primarykey
    data
    text
    <p>After I executed this command.<br> <code>bundle exec rake assets:precompile RAILS_ENV=production</code></p> <p>Now, jQuery doesn't work anymore:(<br> It used to work fine until executing the command.</p> <p>After that, if I type <code>refreshCount();</code> in web console command line, it loads function and it works fine.<br> Just jQuery part(document.ready) doesn't work anymore:(</p> <p>How can I fix this?</p> <p><strong>assets/javascripts/application.js</strong></p> <pre><code>... //= require jquery //= require jquery-ui //= require twitter/bootstrap //= require jquery_ujs //= require jquery.ui.datepicker //= require autocomplete-rails </code></pre> <p><strong>views/layouts/application.html.erb</strong></p> <pre><code>&lt;%= csrf_meta_tags %&gt; &lt;%= javascript_include_tag 'application.js' %&gt; &lt;%= javascript_include_tag 'delete.js.coffee' %&gt; &lt;%= javascript_include_tag 'bootstrap.js.coffee' %&gt; &lt;%= javascript_include_tag 'rails.js' %&gt; &lt;%= javascript_include_tag 'registrations.js.coffee' %&gt; &lt;%= javascript_include_tag 'tag-it.js' %&gt; &lt;%= stylesheet_link_tag "application","http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" %&gt; &lt;%= javascript_include_tag 'reload_count.js' %&gt; </code></pre> <p><strong>generated HTML</strong></p> <pre><code>&lt;meta content="6Ee26DJl4R+RoEAP8mHpFaqAQkjAn1TtEFmrWXibfk=" name="csrf-token" /&gt; &lt;script src="/assets/application-hh43uu8e5f7e03b516a031d93d.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/delete-sj4u7032e3f5d3e60ceuu20c3f5792f.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/bootstrap-2b929657252555a21c8fe0915f73.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/rails-e69b066913d4a1ff967520b8444026d9.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/registrations-c8f90781b38ab1267919654197414382.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/tag-it-6bca56a5321c9d3e353987690b24ec8a.js" type="text/javascript"&gt;&lt;/script&gt; &lt;link href="/assets/application-13c063e9f4b98571dfe06a1594565bdf.css" media="screen" rel="stylesheet" type="text/css" /&gt; &lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" media="screen" rel="stylesheet" type="text/css" /&gt; &lt;script src="/assets/reload_count-0cdf66811b7eaff438be9c8b8cc932bf.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p><strong>assets/javascripts/reload_count.js</strong></p> <pre><code> jQuery(document).ready(function() { refreshCount(); }); function refreshCount() { $.ajax({ url: "/messages/refresh_count", type: "GET", dataType: "script", }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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