Note that there are some explanatory texts on larger screens.

plurals
  1. POasset precompilation error from blueprint css - ActionView::Template::Error (blueprint/screen.css isn't precompiled) - Internal Server Error 500
    primarykey
    data
    text
    <p>I'm trying to deploy a rails app but I'm stuck with an asset pre-compilation error. According to the production log the error is being caused by a 'Blueprint' css script called screen.css (as you can see in the error output below). However according to the production log, this asset does in fact get pre-compiled. I've tried explicitly adding screen.css and print.css to the precompile array, both in the application.rb and config/environments/production.rb files as follows</p> <pre><code>config.assets.precompile = %w(screen.css print.css) </code></pre> <p>but to no avail. I've also tried precompiling my assets locally and pushing the whole thing to the server. I've tried all the suggestions outlined here: <a href="https://stackoverflow.com/questions/7443536/blueprint-screen-css-isnt-precompiled">blueprint/screen.css isn&#39;t precompiled</a> and here: <a href="https://stackoverflow.com/questions/7300532/blueprint-css-rails-3-1-help">blueprint css rails 3.1 help</a> and the same problem remains unresolved here: <a href="https://stackoverflow.com/questions/9105027/ruby-on-rails-3-2-compiled-assets-are-not-working">Ruby on Rails 3.2 compiled assets are not working</a></p> <p>I have no idea what to try next to resolve this error. Any help would be hugely appreciated! The log output is below, along with my deploy file, cap file and application.rb file. Thanks in advance for any suggestions you might have!</p> <p>Here's some output from the log file after deploy where you can see that screen.css gets pre-compiled. The error output follows:</p> <pre><code>Compiled application.js (5ms) (pid 16431) Compiled jquery.js (2ms) (pid 16431) Compiled jquery_ujs.js (0ms) (pid 16431) Compiled microposts.js (94ms) (pid 16431) Compiled pages.js (1ms) (pid 16431) Compiled sessions.js (0ms) (pid 16431) Compiled users.js (0ms) (pid 16431) Compiled application.css (17ms) (pid 16431) Compiled blueprint/ie.css (0ms) (pid 16431) Compiled blueprint/plugins/buttons/screen.css (0ms) (pid 16431) Compiled blueprint/plugins/fancy-type/screen.css (0ms) (pid 16431) Compiled blueprint/plugins/link-icons/screen.css (0ms) (pid 16431) Compiled blueprint/plugins/rtl/screen.css (0ms) (pid 16431) Compiled blueprint/print.css (0ms) (pid 16431) Compiled blueprint/screen.css (0ms) (pid 16431) Compiled blueprint/src/forms.css (0ms) (pid 16431) Compiled blueprint/src/grid.css (0ms) (pid 16431) Compiled blueprint/src/ie.css (0ms) (pid 16431) Compiled blueprint/src/print.css (0ms) (pid 16431) Compiled blueprint/src/reset.css (0ms) (pid 16431) Compiled blueprint/src/typography.css (0ms) (pid 16431) Compiled custom.css (0ms) (pid 16431) Compiled microposts.css (13ms) (pid 16431) Compiled pages.css (1ms) (pid 16431) Compiled scaffolds.css (15ms) (pid 16431) Compiled sessions.css (1ms) (pid 16431) Compiled users.css (1ms) (pid 16431) Started GET "/" for 12.13.14.15 at 2012-04-05 14:15:50 -0700 Processing by PagesController#home as HTML Rendered pages/home.html.erb within layouts/application (1.1ms) Rendered layouts/_stylesheets.html.erb (1.3ms) Completed 500 Internal Server Error in 6ms ActionView::Template::Error (blueprint/screen.css isn't precompiled): 1: &lt;!--[if lt IE9]&gt; 2: &lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt; 3: &lt;![endif]--&gt; 4: &lt;%= stylesheet_link_tag 'blueprint/screen', :media =&gt; 'screen' %&gt; 5: &lt;%= stylesheet_link_tag 'blueprint/print', :media =&gt; 'print' %&gt; 6: &lt;!--[if lt IE 8]&gt;&lt;%= stylesheet_link_tag 'blueprint/ie' %&gt;&lt;![endif]--&gt; 7: &lt;%= stylesheet_link_tag 'custom', :media =&gt; 'screen' %&gt; app/views/layouts/_stylesheets.html.erb:4:in `_app_views_layouts__stylesheets_html_erb___2010157553399413981_33056460' app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__4294160261947576619_31749320' </code></pre> <p>And here's the deploy file:</p> <pre><code>$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. require "rvm/capistrano" # Load RVM's capistrano plugin. require "bundler/capistrano" set :application, "Project" set :scm, "git" set :repository, "ssh://server.example.ca/usr/local/git_root/project.git" set :user, "deploy" #set :rvm_bin_path, "/usr/local/rvm/bin" set :rvm_ruby_string, "ruby-1.9.2-p290@project" set :normalize_asset_timestamps, false ssh_options[:forward_agent] = true set :branch, "master" set :deploy_via, :remote_cache # If you aren't deploying to /u/apps/#{application} on the target # servers (which is the default), you can specify the actual location # via the :deploy_to variable: set :deploy_to, "/usr/local/www/sites/project.example.ca/" set :use_sudo, false set :domain, 'project.example.ca' role :app, domain role :web, domain role :db, domain, :primary =&gt; true before "deploy:symlink", "assets:precompile" namespace :assets do desc "Compile assets" task :precompile, :roles =&gt; :app do run "cd #{release_path} &amp;&amp; bundle exec rake RAILS_ENV=#{rails_env} assets:precompile" end end </code></pre> <p>Here's my capfile:</p> <pre><code>load 'deploy' if respond_to?(:namespace) # cap2 differentiator Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } load 'config/deploy' load 'deploy/assets' </code></pre> <p>Here's the application.rb config file:</p> <pre><code>require File.expand_path('../boot', __FILE__) require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets =&gt; %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end module Arbiterapi class Application &lt; Rails::Application # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] # Enable the asset pipeline config.assets.enabled = true # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' # Precompile problem assets config.assets.precompile = %w(screen.css print.css) end end </code></pre>
    singulars
    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. COCould you show whats in your application.css ? Maybe you haven't added all the required css files there. Could you try running this `bundle exec rake assets:precompile` on your local dev machine and then copying the entire public folder to your production server. Also as a last resort try setting config.assets.compile to true in config/environments/production.rb.
      singulars
    2. COMy application.css file is empty, except for this automatically generated comment: /* * This is a manifest file that'll automatically include all the stylesheets available in this directory * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at * the top of the compiled file, but it's generally better to create a new file per style scope. *= require_self *= require_tree . */
      singulars
    3. COI've also already tried pre-compiling assets on my local machine via `bundle exec rake assets:precompile` and then pushing my git repository to my remote server, and subsequently running `cap deploy:update`. After this, all the pre-compiled assets are in the public folder on my webserver as they should be.
      singulars
 

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