Sprockets :: FileNotFound找不到类型为'text / css'的文件'bootstrap' [英] Sprockets::FileNotFound couldn't find file 'bootstrap' with type 'text/css'
本文介绍了Sprockets :: FileNotFound找不到类型为'text / css'的文件'bootstrap'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以这是我尝试运行Rails服务器时在浏览器中遇到的错误:
So this is the error I am getting in my browser when I try to run the rails server:
[couldn't find file 'bootstrap' with type 'text/css']
我的gemfile中包含以下内容:
I have this in my gemfile:
gem 'bootstrap-sass', '~> 3.3.5.1'
这是我的application.css.scss文件:
And this is my application.css.scss file:
*= require bootstrap
*= require_tree .
*= require_self
*/
@import "bootstrap";
有人知道如何启动和运行它吗?
Does anyone know how to get this up and running??
推荐答案
我遇到了类似的问题并删除了
I had a similar problem and removing
*=require bootstrap
并添加
@import "bootstrap-sprockets";
@import "bootstrap";
到application.css.scss文件的末尾解决了问题
to the end of application.css.scss file solved the problem
这篇关于Sprockets :: FileNotFound找不到类型为'text / css'的文件'bootstrap'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文