好的,所以我试图引入一个引导主题,我试图带来的主题是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";
我的宝石文件读作
gem "font-awesome-rails"
gem 'bootstrap-sass', '~> 3.3.6'
gem 'font-awesome-sass'
我一直在我的控制台中抛出此错误,我不知道如何解决它
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
这到底出了什么问题?希望有人可以提供帮助
答案 0 :(得分:0)
不要尝试将静态css导入sass文件,而是让资产管道管理静态文件。对于jquery插件的东西,你可以将它们放在供应商/资产/样式表中,用于你想要编辑的东西,比如style.css,把它放在app / assets / stylesheets中
所以你的application.css.scss看起来更像是
# First clone the octopus or work on your local copy
# Install required packages etc
gem install bundler
bundler install
# Installl the Blog
rake install
# This is teh main part which you need to do.
# Delete the current github repository and create a new one
# Now use the octopress wizard to generate your blog and to deploy it yo github
rake setup_github_pages
# now generate the content
rake generte
# And here comes the magic: Deploy to github
rake deploy