1

I'm trying to make the project that use bootstrap on rails4.1.6.

Here is gemfile:

gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootswatch-rails', '~> 3.1.1'
gem 'twitter-bootswatch-rails-helpers'

$ bundle install was successful.

and settings of bootswatch

$ rails g bootswatch:install cerulean
$ rails g bootswatch:import cerulean
$ rails g bootswatch:layout cerulean

app/assets/stylesheet/application.css

*= require cerulean/loader
*= require cerulean/bootswatch

app/assets/javascript/application.js

//= require cerulean/loader
//= require cerulean/bootswatch

but $ rails s and when I viewed the site , appears the following error:

variable @zindex-modal-background is undefined
 (in /Users/ko2ic/sample/app/assets/stylesheets/cerulean/loader.css.less)

How do you solve it doing?

ko2ic
  • 1,977
  • 14
  • 20
  • Add the contents of `/Users/ko2ic/sample/app/assets/stylesheets/cerulean/loader.css.less` to your question. – Uri Agassi Jan 19 '15 at 19:20
  • 1
    Or google the issue. https://github.com/scottvrosenthal/twitter-bootswatch-rails/issues/30 . Seems @zindex-modal-background was dropped from bootstrap and this is causing the issue but adding this variable back in should resolve your issue. – engineersmnky Jan 19 '15 at 21:36

1 Answers1

1

It was resolved by adding the next code:

assets/stylesheets/cerulean/variables.less

@zindex-modal-background: 0;

reference: http://github.com/scottvrosenthal/twitter-bootswatch-rails/issues/30

ko2ic
  • 1,977
  • 14
  • 20