Note that there are some explanatory texts on larger screens.

plurals
  1. POTwitter bootstrap has Invalid CSS according to Rails 3.1 asset pipeline during precompilation?
    primarykey
    data
    text
    <p>I created a brand new Rails 3.1 app. I added the twitter bootstrap CSS file in app/assets/stylesheets/bootstrap.min.css. Here is the relevant code</p> <p>app/assets/stylesheets/application.css (includes the tree, so bootstrap is included)</p> <pre><code>/* * 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 . */ </code></pre> <p>Gemfile (includes execjs and therubyracer for compile/compress)</p> <pre><code>group :development, :qa do gem 'execjs' gem 'therubyracer' end # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~&gt; 3.1.0' gem 'coffee-rails', '~&gt; 3.1.0' gem 'uglifier', '&gt;= 1.0.3' end </code></pre> <p>Then I run the rake task to precompile assets</p> <pre><code>rake assets:precompile </code></pre> <p>this fails with the following error</p> <pre><code>Invalid CSS after ".inputs-list li+": expected number or function, was "li" </code></pre> <p>that CSS is in the bootstrap file (".inputs-list li+li" is the selector).</p> <p>However, if I run </p> <pre><code>rake assets:precompile RAILS_ENV=development </code></pre> <p>now it works fine. Turns out that if I change config/environments/production.rb to not compress files:</p> <pre><code>config.assets.compress = false </code></pre> <p>then the original command works too (without specifying development environment). </p> <p>So, how do I track down the error? I can live with just turning off compression for now, but obviously something is wrong. Is it Rails? Sprockets? The Ruby Racer? Uglifier?</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.
    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