rails bootstrap-sass assets compilation error - undefined variable alert-padding

前端 未结 4 1248
别那么骄傲
别那么骄傲 2020-12-10 10:27

all roads point to bootstrap-sass

Referral chain:

  • railscast-328 (twitter bootstrap basics) refers to
  • http://www.sitepoint.com/twitter-boots
4条回答
  •  天命终不由人
    2020-12-10 10:58

    Don't know why but for me it helped to put into assets.rb this line

    Rails.application.config.assets.precompile += [/^[-_a-zA-Z0-9]*\..*/]
    

    Initially I had the Sass::SyntaxError: Undefined variable: "$alert-padding". problem with this line

    Rails.application.config.assets.precompile += [/.*\.css/] 
    

    But after I changed it to the first one the problem was solved and everything worked in production.

提交回复
热议问题