Rails: File to import not found or unreadable: “bootstrap”

前端 未结 8 1397
野的像风
野的像风 2021-02-19 14:03

I am relatively new to programming, therefore I hope that the question is not absolutely stupid.

I got a problem concerning my rails app.

I try to use bootstrap.

8条回答
  •  不要未来只要你来
    2021-02-19 14:12

    I got the same problem of "File to import not found or unreadable: bootstrap" in my scss file. I just solved by adding require statement of "bootstrap-sass" to config.ru file. My config.ru is like the following.

    # This file is used by Rack-based servers to start the application.
    
    require ::File.expand_path('../config/environment',  __FILE__)
    require 'bootstrap-sass' #require statement of bootstrap-sass
    run Rails.application
    

提交回复
热议问题