Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6689307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:30:14+00:00 2026-05-26T05:30:14+00:00

I created a brand new Rails 3.1 app. I added the twitter bootstrap CSS

  • 0

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

app/assets/stylesheets/application.css (includes the tree, so bootstrap is included)

/*
 * 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 . 
*/

Gemfile (includes execjs and therubyracer for compile/compress)

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',   '~> 3.1.0'
  gem 'coffee-rails', '~> 3.1.0'
  gem 'uglifier', '>= 1.0.3'
end

Then I run the rake task to precompile assets

rake assets:precompile

this fails with the following error

Invalid CSS after ".inputs-list li+": expected number or function, was "li"

that CSS is in the bootstrap file (“.inputs-list li+li” is the selector).

However, if I run

rake assets:precompile RAILS_ENV=development

now it works fine. Turns out that if I change config/environments/production.rb to not compress files:

config.assets.compress = false

then the original command works too (without specifying development environment).

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:30:15+00:00Added an answer on May 26, 2026 at 5:30 am

    I fixed this using the non-minified version of Bootstrap. It’ll still get compiled when running rake assets:precompile so it’s not an issue 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Brand new at Rails. I had a simple Rails 3 app on OS X
I created a brand new blank Visual Studio 2010 solution, and added an existing
I created a brand new view-based project and added into the viewDidLoad - (void)viewDidLoad
I have created a brand new heroku app, beforehand i deleted the old .git
I have a brand spanking new cPanel server. cPanel recently added xcache functionality right
I have a brand new Rails 3.1rc4 project. After generating a scaffold, migrating and
I created a brand new project using the default Web Application template and I
I have created two brand new solutions using the latest VS 2010: C# console
This is weird. I added a brand new Web Application project to my solution
To start, I'm a pretty new to Rails I've created some methods and put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.