我是编程新手,一直在开发我的第一个基本应用程序。我现在一直有同样的问题超过24小时。用rails导入bootstrap,errror
,当我尝试安装引导和进口之后重装我的应用程序的主页我收到这个错误...
Sass::SyntaxError in Static_pages#home
我安装了引导宝石跑包安装...
gem 'bootstrap-sass'
然后,我在我的stylesheets文件夹中创建了一个新的css文件并将其命名为custom.css.scss
从那里我导入了bootstrap ...
@import "bootstrap";
我保存了该文件,当我刷新页面时,我收到了我在开头列出的错误消息。
以下是我收到的错误消息。它告诉我错误发生在第5行左右。我尝试将文件保存为.scss而不是.css.scss,但问题仍然存在。
File to import not found or unreadable: bootstrap.
Load path: Sass::Rails::Importer(/Users/jackburum/Documents/rails_projects/omrails/app/assets/stylesheets/custom.css.scss)
(in /Users/jackburum/Documents/rails_projects/omrails/app/assets/stylesheets/custom.css.scss)
Extracted source (around line #5):
2: <html>
3: <head>
4: <title>Omrails</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
什么是你的自定义启动文件的内容? – pduersteler 2013-02-20 13:21:01
我相信文件扩展名应该是custom.scss,然后创建custom.css – 2013-02-20 14:21:54
@ChristopherMarshall,不一定。我已经使用这个宝石,我打电话给我的文件bootstrap_and_overrides.css.scss – Leito 2013-02-20 15:41:03