Note that there are some explanatory texts on larger screens.

plurals
  1. POMy assets are not precompling on Heroku
    primarykey
    data
    text
    <p>My assets are not precompling on Heroku. I am running on cedar and have application.js and application.css defined like (js):</p> <pre><code>... //= require jquery //= require jquery_ujs //= require data_table //= require_tree . </code></pre> <p>When I run that locally on my machine with</p> <pre><code>bundle exec rake assets:precompile RAILS_ENV=production </code></pre> <p>it works, the js and css l. When I deploy I see this:</p> <pre><code>-----&gt; Preparing app for Rails asset pipeline Running: rake assets:precompile DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /tmp/build_b3aac0a4-54a9-4423-bba2-c15771931ae2/Rakefile:7) Asset precompilation completed (6.04s) </code></pre> <p>So its doing something, but my appliation.js when served from heroku remains like this:</p> <pre><code>... //= require jquery //= require jquery_ujs //= require data_table //= require_tree . </code></pre> <p>My production.rb looks like this:</p> <pre><code> ... # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both thread web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this. # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. # config.action_dispatch.rack_cache = true # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = true # Generate digests for assets URLs. config.assets.digest = true # Version of your assets, change this if you want to expire all your assets. config.assets.version = '1.0' # Set to :debug to see everything in the log. config.log_level = :info config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify # Disable automatic flushing of the log to improve performance. # config.autoflush_log = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new ... </code></pre> <p>...</p> <p>Here is what I see when deploying:</p> <pre><code> -----&gt; Ruby/Rails app detected -----&gt; Using Ruby version: ruby-2.0.0 -----&gt; Installing dependencies using Bundler version 1.3.2 Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment Using rake (10.1.0) Using i18n (0.6.5) Using multi_json (1.8.0) Using activesupport (3.2.6) Using builder (3.0.4) Using activemodel (3.2.6) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.5) Using rack-cache (1.2) Using rack-test (0.6.2) Using hike (1.2.3) Using tilt (1.4.1) Using sprockets (2.1.3) Using actionpack (3.2.6) Using mime-types (1.25) Using polyglot (0.3.3) Using treetop (1.4.15) Using mail (2.4.4) Using actionmailer (3.2.6) Using active_model_serializers (0.8.1) Using arel (3.0.2) Using tzinfo (0.3.37) Using activerecord (3.2.6) Using activeresource (3.2.6) Using addressable (2.3.5) Using extlib (0.9.16) Using autoparse (0.3.3) Using multi_xml (0.5.5) Using httparty (0.11.0) Using json (1.8.0) Using mini_portile (0.5.1) Using nokogiri (1.6.0) Using uuidtools (2.1.4) Using aws-sdk (1.5.8) Using bcrypt-ruby (3.0.1) Using climate_control (0.0.3) Using cocaine (0.5.1) Using coffee-script-source (1.6.3) Using execjs (2.0.1) Using coffee-script (2.2.0) Using rack-ssl (1.3.3) Using rdoc (3.12.2) Using thor (0.18.1) Using railties (3.2.6) Using coffee-rails (3.2.2) Using faker (1.2.0) Using multipart-post (1.2.0) Using faraday (0.8.8) Using flickraw (0.9.6) Using jwt (0.1.8) Using launchy (2.3.0) Using signet (0.4.5) Using google-api-client (0.6.4) Using jquery-rails (3.0.4) Using kgio (2.8.1) Using mono_logger (1.1.0) Using paperclip (3.5.1) Using pg (0.16.0) Using rack-protection (1.5.0) Using bundler (1.3.2) Using rails (3.2.6) Using raindrops (0.12.0) Using redis (3.0.4) Using redis-namespace (1.3.1) Using sinatra (1.4.3) Using vegas (0.1.11) Using resque (1.24.1) Using rufus-scheduler (2.0.24) Using resque-scheduler (2.0.1) Using sass (3.2.10) Using sass-rails (3.2.6) Using uglifier (2.2.1) Using unicorn (4.6.3) Using will_paginate (3.0.4) Your bundle is complete! It was installed into ./vendor/bundle Cleaning up the bundler cache. -----&gt; Writing config/database.yml to read from DATABASE_URL -----&gt; Preparing app for Rails asset pipeline Running: rake assets:precompile DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7) DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7) DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7) DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from &lt;top (required)&gt; at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7) Asset precompilation completed (4.63s) -----&gt; WARNINGS: Injecting plugin 'rails_log_stdout' Injecting plugin 'rails3_serve_static_assets' Add 'rails_12factor' gem to your Gemfile to skip plugin injection You have not declared a Ruby version in your Gemfile. To set your Ruby version add this line to your Gemfile: ruby '2.0.0' # See https://devcenter.heroku.com/articles/ruby-versions for more information." -----&gt; Discovering process types Procfile declares types -&gt; web Default types for Ruby/Rails -&gt; console, rake, worker -----&gt; Compiled slug size: 50.7MB -----&gt; Launching... done, v25 http://NAME.herokuapp.com deployed to Heroku </code></pre> <p>So it should be all godd, but no luck. What do I need to do to enable slug asset compilation?</p> <p><strong>UPDATE</strong>:</p> <p>Created a repo <a href="https://github.com/whoisstan/asset-test.herokuapp.com" rel="nofollow">https://github.com/whoisstan/asset-test.herokuapp.com</a> and a heroku app that demonstrate the behavior: </p> <p><a href="http://asset-test.herokuapp.com/welcome/index" rel="nofollow">http://asset-test.herokuapp.com/welcome/index</a></p> <p>the application.js remains blank. </p> <p>How do I need to describe my production environment? I don't want to precompile locally.</p> <p><a href="https://github.com/whoisstan/asset-test.herokuapp.com/blob/master/config/environments/production.rb" rel="nofollow">https://github.com/whoisstan/asset-test.herokuapp.com/blob/master/config/environments/production.rb</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.
    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