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

前端 未结 4 1256
别那么骄傲
别那么骄傲 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 11:22

    There is an issue with globing and precompiling assets. https://github.com/twbs/bootstrap-sass/issues/863

    If you must precompile your js and css assets:

    Rails.application.config.assets.precompile += [proc { |filename, path| path =~ /(app|lib|vendor)\/assets/ && ['.js', '.css'].include?(File.extname(filename)) }]
    

    Basically this proc will look in app lib and vendor folders for your assets.

    Also, used a section of the Rails Guide to come up with this code

提交回复
热议问题