Note that there are some explanatory texts on larger screens.

plurals
  1. POAssets say "not precompiled" when they are precompiled
    primarykey
    data
    text
    <p>Ok so, I'm getting this error when I try to use the asset pipeline. I don't understand what's causing it.</p> <pre><code>Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError in Photos#show Showing .../app/views/photos/_photo_view.html.haml where line #2 raised: jquery.autocomplete isn't precompiled Extracted source (around line #2): 1: - content_for :scripts do 2: = javascript_include_tag 'jquery.autocomplete' </code></pre> <p>However, this IS precompiled. I ran <code>rake assets:precompile RAILS_ENV=production</code> before starting the server, and in my <code>public/assets</code> directory I have the file: <code>jquery-5550a245a55b28927b5552cac182e612.autocomplete.js</code> as well as <code>.js.gz</code>, and it's accurately reflected in the manifest:</p> <pre><code>#manifest.yml --- application.js: application-4277323e3f7506b71f45c71e8a3a7c8f.js jquery.autocomplete.js: jquery-5550a245a55b28927b5552cac182e612.autocomplete.js jquery.cycle.all.min.js: jquery-183ef696b43944deaee5778d3094dbdd.cycle.all.min.js jquery.fancybox.js: jquery-e52e44b2b4fb349bade9beb91461a810.fancybox.js jquery.plupload.queue.js: jquery-f2e7f6ad7d2e5ca50235ed21f8d573cc.plupload.queue.js jquery.tools.js: jquery-c53e304240fa56767fe0f2a00cb4bceb.tools.js plupload.full.js: plupload-5dd26ee3fff6b627c19f196e9d1429dd.full.js application.css: application-ce5217e1714cbc4e9c3ff6c5dfc9b221.css fancybox.css: fancybox-9ee9c36f391086e4b0629b7df4042390.css jquery.plupload.queue.css: jquery-661fbf3f503aa32ff11c004838c0820b.plupload.queue.css jquery.js: jquery-4d23f0cfea862f56deb04f0a8ab1fcee.js jquery.min.js: jquery-8a50feed8d29566738ad005e19fe1c2d.min.js </code></pre> <p>The javascript file in question is not loaded in my <code>application.js</code> file because I only need it on one view and don't use it anywhere else in the app. To account for that (and to fix sprockets trying to compile sass partials) I configured my precompile regexp like so:</p> <pre><code>#environments/production.rb config.assets.precompile = [/^[a-zA-Z]*\..*/] </code></pre> <p>(The above regexp precompiles any file that starts with a letter character, and ignores files starting with a non-letter character like an underscore).</p> <p>Does anyone have any insight into what's causing this and how it can be fixed? The asset pipeline is making me pull my hair out!</p> <h2>UPDATE</h2> <p>just found out that Rails.configuration.assets.digests is returning nil in production. maybe the problem is there, for some reason sprockets is not finding the manifest.yml.</p> <p>Im probably mistaken but seems like sprockets is not using the assets_host in config when looking for the manifest.yml.</p> <p><a href="https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/sprockets/railtie.rb#L38" rel="nofollow">https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/sprockets/railtie.rb#L38</a></p>
    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.
 

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