Using boostrap.css file in Rails production/heroku w/o LESS or SASS

前端 未结 2 1136
长发绾君心
长发绾君心 2021-01-23 16:16

I\'m trying to use the glyphicons provided by bootstrap in my rails 4.0beta1 app. Everything works fine in development, but in production nothing gets rendered, and in the herok

2条回答
  •  孤城傲影
    2021-01-23 16:53

    Well, oddly, background-image did not seem to work in production. I was loading other background images using just the background: property, so I tried that and now it (magically) works in production:

    background: url(<%= asset_path 'glyphicons-halflings.png' %>);
    

    with bootstrap.css.erb as the filename.

    Still confused as to why background-image was working in development but not production ...

提交回复
热议问题