简体   繁体   English

Sass :: SyntaxError文件导入找不到或不可读:样式

[英]Sass::SyntaxError File to import not found or unreadable: style

Ok so I am trying to bring over a bootstrap theme the theme I am trying to bring over is the Raleway theme and I have brought over my style sheets from my application.html.erb file to my application.scss file like this 好的,所以我试图带来一个引导主题,我想要带来的主题是Raleway主题,并且我已经将样式表从我的application.html.erb文件转移到了我的application.scss文件中

@import "bootstrap-sprockets";
@import "bootstrap";


@import "style";
@import "bootstrap-social";
@import "animate.min";
@import "owl.carousel";
@import "jquery.snippet";
@import "buttons";

@import "colors/blue";

@import "width-full";
@import "width-boxed";


@import "ionicons.min";
@import "ionicons";

@import "magnific-popup";
@import "font-awesome-sprockets";
@import "font-awesome";

@import "portfolio_helper";
@import "terms";

my gem file reads as this 我的宝石文件显示为

gem "font-awesome-rails"
  gem 'bootstrap-sass', '~> 3.3.6'
  gem 'font-awesome-sass'

I keep getting this error thrown in my console and I have no idea how to fix it 我不断在控制台中抛出此错误,但我不知道如何解决它

ActionView::Template::Error (File to import not found or unreadable: style.
Load paths:
  /Users/Development/style_me/app/assets/images
  /Users/Development/style_me/app/assets/javascripts
  /Users/Development/style_me/app/assets/stylesheets
  /Users/Development/style_me/vendor/assets/javascripts
  /Users/Development/style_me/vendor/assets/stylesheets
  /Users/.rvm/gems/ruby-2.2.2/gems/font-awesome-rails-4.6.1.0/app/assets/fonts
  /Users/.rvm/gems/ruby-2.2.2/gems/font-awesome-rails-4.6.1.0/app/assets/stylesheets
  /Users/.rvm/gems/ruby-2.2.2/gems/turbolinks-2.5.3/lib/assets/javascripts
  /Users/.rvm/gems/ruby-2.2.2/gems/jquery-rails-4.1.1/vendor/assets/javascripts
  /Users/.rvm/gems/ruby-2.2.2/gems/coffee-rails-4.1.1/lib/assets/javascripts
  /Users/.rvm/gems/ruby-2.2.2/gems/bootstrap-sass-3.3.6/assets/stylesheets
  /Users/.rvm/gems/ruby-2.2.2/gems/bootstrap-sass-3.3.6/assets/javascripts
  /Users/.rvm/gems/ruby-2.2.2/gems/bootstrap-sass-3.3.6/assets/fonts
  /Users/.rvm/gems/ruby-2.2.2/gems/bootstrap-sass-3.3.6/assets/images
  /Users/.rvm/gems/ruby-2.2.2/gems/font-awesome-sass-4.5.0/assets/stylesheets
  /Users/.rvm/gems/ruby-2.2.2/gems/font-awesome-sass-4.5.0/assets/fonts
  /Users/.rvm/gems/ruby-2.2.2/gems/bootstrap-sass-3.3.6/assets/stylesheets
  /Users/.rvm/gems/ruby-2.2.2/gems/font-awesome-sass-4.5.0/assets/stylesheets):
    2: <html>
    3: <head>
    4:   <title>StyleMe</title>
    5:   <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
    6:   <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
    7:   <%= csrf_meta_tags %>
    8: </head>
  app/assets/stylesheets/application.scss:5
  app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___621181811976196065_70285942571180

What exactly is going wrong here? 这到底是怎么了? Hope someone can help out 希望有人可以帮忙

Rather than trying to import static css into a sass file, let the asset pipeline manage the static files. 让资产管道管理静态文件,而不是尝试将静态CSS导入到sass文件中。 For things that are jquery plugins, you can put them in vendor/assets/stylesheets, for things that you'll want to edit, like style.css, put it in app/assets/stylesheets 对于jquery插件,您可以将它们放在供应商/资产/样式表中,对于要编辑的东西,例如style.css,请将其放入应用程序/资产/样式表中

So your application.css.scss would look more like 所以你的application.css.scss看起来更像

*= require style
*= require bootstrap-social
*= require animate.min
*= require owl.carousel
*= require jquery.snippet
*= require buttons
*= require colors/blue
*= require width-full
*= require width-boxed
*= require ionicons.min
*= require magnific-popup
*= require portfolio_helper
*= require terms


@import "bootstrap-sprockets";
@import "bootstrap";
@import "font-awesome-sprockets";
@import "font-awesome";

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM