Rails 4 + bootstrap set up assets

前端 未结 8 1508
春和景丽
春和景丽 2021-02-04 06:53

I am trying to setup bootstrap on Rails4 using bootstrap-sass and I am getting this famous error:

Sprockets::FileNotFound - couldn         


        
8条回答
  •  伪装坚强ぢ
    2021-02-04 07:41

    I had exactly the same error. The solution was to change in:

    config/environments/production.rb
    

    The line

    config.serve_static_assets = false
    

    to

    config.serve_static_assets = true
    

    I'm not exactly aware of what this line does, but my workteam had the same problem on a project, and they changed this line, and it worked.

提交回复
热议问题