2016-07-10 6 views
0

私のアプリケーションは私のapplication.css.scssスタイルシートだけを読んでいるので、他のスタイルシートをアプリケーションで読みたいと思っています。前にこの問題は発生していません。私は次の拡張子(.css.scssと.css)で他のスタイルシートの名前を変更しようとしましたが、私の宝石のさまざまなバリエーションを試しましたが、何も動作していないようです。ここに私の現在のスタイルシートは、次のとおりです。アプリケーションがスタイルシートを読み込まない

application.css.scss 
static_pages.scss 
users.scss 

Gemfile:

gem 'pg',   '0.17.1' 
gem 'rails',  '4.2.2' 
gem 'puma',   '3.4.0' 
gem 'sass-rails', '4.0.3' 
gem 'uglifier',  '3.0.0' 
gem 'coffee-rails', '4.1.0' 
gem 'jquery-rails', '4.1.1' 
gem 'turbolinks', '2.3.0' 
gem 'jbuilder',  '2.2.3' 
gem 'bootstrap-sass',  '3.2.0.0' 
gem 'sdoc', '~> 0.4.0', group: :doc 

gem 'devise' 
gem 'devise_security_extension' 

group :development, :test do 
    gem 'pg',    '0.17.1' 
    gem 'byebug',  '3.4.0' 
    gem 'web-console', '2.0.0.beta3' 
    gem 'spring',  '1.1.3' 

エンド

group :production do 
    gem 'pg',    '0.17.1' 

end 

アプリケーションスタイルシート:

それはあなたの applicationファイルのように見えます
/* 
* This is a manifest file that'll be compiled into application.css, which will include all the files 
* listed below. 
* 
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. 
* 
* You're free to add application-wide styles to this file and they'll appear at the bottom of the 
* compiled file so the styles you add here take precedence over styles defined in any styles 
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new 
* file per style scope. 
* 
*= require_tree . 
*= require_self 
*/ 


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

答えて

1

はSCSSファイルであります。 ですので、@importでファイルをインポートする必要があります。

@import "bootstrap-sprockets"; 
@import "bootstrap"; 
@import "static_pages"; 
@import "users"; 
+0

RaVen!ありがとうございました! :) – richiepop2

関連する問題