teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

タイトルの変更

2016/02/04 07:44

投稿

honsan
honsan

スコア6

title CHANGED
@@ -1,1 +1,1 @@
1
- railsアセットパイプライン実行されない
1
+ Ruby on RailsBootstrapブラウザに反映しない
body CHANGED
File without changes

1

assets/stylesheets/application\.cssに直接custom\.css\.scssの内容を書き込んでみた結果

2016/02/04 07:44

投稿

honsan
honsan

スコア6

title CHANGED
File without changes
body CHANGED
@@ -24,6 +24,54 @@
24
24
  ```
25
25
  最後にローカルサーバーを起動し、ブラウザで表示しましたが1~4の手順を踏む前と変化がありませんでした。
26
26
 
27
+ ちなみに試しにcustom.css.scssファイルの内容をそのままapplication.cssに追加し.scss拡張子を加えたところbootstrapが反映されました。
28
+ 以下が変更を加えたapplication.css.scssファイル
29
+ ```lang-scss
30
+ /*
31
+ * This is a manifest file that'll be compiled into application.css, which
32
+ * will include all the files listed below.
33
+ *
34
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets,
35
+ * vendor/assets/stylesheets, or vendor/assets/stylesheets of plugins, if any,
36
+ * can be referenced here using a relative path.
37
+ *
38
+ * You're free to add application-wide styles to this file and they'll appear
39
+ * at the bottom of the compiled file so the styles you add here take
40
+ * precedence over styles defined in any styles defined in the other CSS/SCSS
41
+ * files in this directory. It is generally better to create a new file per
42
+ * style scope.
43
+ *
44
+ *= require_tree .
45
+ *= require_self
46
+ *= require custom
47
+ */
48
+ @import "bootstrap-sprockets";
49
+ @import "bootstrap";
50
+
51
+
52
+ /* universal */
53
+
54
+ body {
55
+ padding-top: 60px;
56
+ }
57
+
58
+ section {
59
+ overflow: auto;
60
+ }
61
+
62
+ textarea {
63
+ resize: vertical;
64
+ }
65
+
66
+ .center {
67
+ text-align: center;
68
+ }
69
+
70
+ .center h1 {
71
+ margin-bottom: 10px;
72
+ }
73
+ ```
74
+
27
75
  ####その他関連ファイル
28
76
  **app/assets/stylesheets/application.css**
29
77
  ``` lang-css