3

I get this error when I compile to production.

Sass::SyntaxError: Undefined variable: "$alert-padding".

The compiler worked fine until now, only today when I backed up a styles.css.scss file this error occurred.

In production env I have

  config.assets.precompile =  ['*.js', '*.css', '*.css.erb', '*.scss'] 

content of styles.css.scss

$btn-default-bg: green;
$btn-default-color: white;
$navbar-default-bg: white;
$navbar-default-border: white;
@import 'bootstrap';

html{

height:100%;  

}

body {
  height:100%;
  padding-top: 60px;
  background: rgba(0,123,91,1);
}

// @import 'bootstrap-responsive';
.navbar-header,
#bs-example-navbar-collapse-1{
  background: #004835 !important;
}

.navbar-default .navbar-brand,
.navbar-default .navbar-nav>li>a{
  color:#ffffff;
}

nav{
  border:none !important;
}

application.css

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * 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 phrasing
 *= require_tree .
 */
amphetamachine
  • 27,620
  • 12
  • 60
  • 72
Scoala
  • 150
  • 11
  • did you manage to fix it? – dima May 05 '15 at 12:36
  • Also having the same issue. Did you fix it? – Al D Sep 15 '15 at 23:00
  • It's a duplicate, It was answered here: http://stackoverflow.com/questions/21911620/rails-bootstrap-sass-assets-compilation-error-undefined-variable-alert-padding In other words, just comment the assets.precompile line in your application.rb or production.rb file. – rfsbsb Feb 01 '16 at 20:14

0 Answers0