質問編集履歴

4

追記

2017/12/21 16:05

投稿

ekki
ekki

スコア6

test CHANGED
File without changes
test CHANGED
@@ -139,3 +139,133 @@
139
139
  margin-bottom: 5px;
140
140
 
141
141
  }
142
+
143
+ 何度もありがとうございます。ログですが該当箇所がどこなのかわからないです。
144
+
145
+ おそらくこの辺かなと思うところを貼ります。勉強不足ですいません。
146
+
147
+
148
+
149
+ Started GET "/app/assets/application.css" for 127.0.0.1 at 2017-12-21 22:36:51 +0900
150
+
151
+
152
+
153
+ ActionController::RoutingError (No route matches [GET] "/app/assets/application.css"):
154
+
155
+ Started GET "/app/assets/application.js" for 127.0.0.1 at 2017-12-21 22:36:51 +0900
156
+
157
+
158
+
159
+
160
+
161
+ actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
162
+
163
+ web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
164
+
165
+ web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
166
+
167
+ web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
168
+
169
+ web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
170
+
171
+ actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
172
+
173
+ railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
174
+
175
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
176
+
177
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
178
+
179
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
180
+
181
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
182
+
183
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
184
+
185
+ sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
186
+
187
+ actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
188
+
189
+ actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
190
+
191
+ rack (2.0.3) lib/rack/method_override.rb:22:in `call'
192
+
193
+ rack (2.0.3) lib/rack/runtime.rb:22:in `call'
194
+
195
+ activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
196
+
197
+ actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
198
+
199
+ actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
200
+
201
+ rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
202
+
203
+ railties (5.1.4) lib/rails/engine.rb:522:in `call'
204
+
205
+ puma (3.11.0) lib/puma/configuration.rb:225:in `call'
206
+
207
+ puma (3.11.0) lib/puma/server.rb:624:in `handle_request'
208
+
209
+ puma (3.11.0) lib/puma/server.rb:438:in `process_client'
210
+
211
+ puma (3.11.0) lib/puma/server.rb:302:in `block in run'
212
+
213
+ puma (3.11.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
214
+
215
+ ActionController::RoutingError (No route matches [GET] "/app/assets/application.js"):
216
+
217
+
218
+
219
+ actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
220
+
221
+ web-console (3.5.1) lib/web_console/middleware.rb:135:in `call_app'
222
+
223
+ web-console (3.5.1) lib/web_console/middleware.rb:28:in `block in call'
224
+
225
+ web-console (3.5.1) lib/web_console/middleware.rb:18:in `catch'
226
+
227
+ web-console (3.5.1) lib/web_console/middleware.rb:18:in `call'
228
+
229
+ actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
230
+
231
+ railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
232
+
233
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
234
+
235
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
236
+
237
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
238
+
239
+ activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
240
+
241
+ railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
242
+
243
+ sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
244
+
245
+ actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
246
+
247
+ actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
248
+
249
+ rack (2.0.3) lib/rack/method_override.rb:22:in `call'
250
+
251
+ rack (2.0.3) lib/rack/runtime.rb:22:in `call'
252
+
253
+ activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
254
+
255
+ actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
256
+
257
+ actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
258
+
259
+ rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
260
+
261
+ railties (5.1.4) lib/rails/engine.rb:522:in `call'
262
+
263
+ puma (3.11.0) lib/puma/configuration.rb:225:in `call'
264
+
265
+ puma (3.11.0) lib/puma/server.rb:624:in `handle_request'
266
+
267
+ puma (3.11.0) lib/puma/server.rb:438:in `process_client'
268
+
269
+ puma (3.11.0) lib/puma/server.rb:302:in `block in run'
270
+
271
+ puma (3.11.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

3

追記

2017/12/21 16:05

投稿

ekki
ekki

スコア6

test CHANGED
File without changes
test CHANGED
@@ -61,3 +61,81 @@
61
61
  私はオンラインのプログラム教材を通して勉強しているのですが同じように進めてみても行き詰ってしまいます。
62
62
 
63
63
  初歩的な内容で恐縮なのですが、回答していただけるととても助かります。
64
+
65
+ ###追記
66
+
67
+ app/assets/stylesheetsの中身はapplication.cssとposts.scssファイルがありまして
68
+
69
+ 下のコードがapplication.cssのファイルです。posts.scssはいじってないです。
70
+
71
+ javascriptsのほうはapplication.js,cable.js,posts.coffeeとchannelsフォルダがあります。
72
+
73
+ channelsフォルダには.keepがあります。javascriptsのほうも触ってません。
74
+
75
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
76
+
77
+ * listed below.
78
+
79
+ *
80
+
81
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
82
+
83
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
84
+
85
+ *
86
+
87
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
88
+
89
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
90
+
91
+ * files in this directory. Styles in this file should be added after the last require_* statement.
92
+
93
+ * It is generally better to create a new file per style scope.
94
+
95
+ *
96
+
97
+ *= require_tree .
98
+
99
+ *= require_self
100
+
101
+ */
102
+
103
+
104
+
105
+ .container {
106
+
107
+ width: 400px;
108
+
109
+ margin: 20px auto;
110
+
111
+ }
112
+
113
+ body {
114
+
115
+ font-size: : 14px;
116
+
117
+ font-family: Verdana, sans-serif;
118
+
119
+ }
120
+
121
+ h2 {
122
+
123
+ font-size: 10000px;
124
+
125
+ padding-bottom: 10px;
126
+
127
+ margin-bottom: 15px;
128
+
129
+ border-bottom: 15px;
130
+
131
+ border-bottom: 1px solid #ddd;
132
+
133
+ }
134
+
135
+
136
+
137
+ ul > li {
138
+
139
+ margin-bottom: 5px;
140
+
141
+ }

2

コードの修正

2017/12/21 14:19

投稿

ekki
ekki

スコア6

test CHANGED
File without changes
test CHANGED
File without changes

1

コードの修正

2017/12/21 14:06

投稿

ekki
ekki

スコア6

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,13 @@
48
48
 
49
49
  applicaton.cssでcssを書きwebサイトを更新しましたがうまく反映されませんでした。
50
50
 
51
- そこでさきほど削除したコードを元に戻すとやはりまた同じようなエラーが出ます。
51
+ そこでさきほど削除したコードを元に戻すとやはりまた同じようなエラーが出ます。また調べ直してコードを
52
+
53
+ <%= stylesheet_link_tag '/app/assets/application', media: 'all', 'data-turbolinks-track': 'reload' %>
54
+
55
+ <%= javascript_include_tag '/app/assets/application', 'data-turbolinks-track': 'reload' %>
56
+
57
+ のように直したのですがそれでも反映されません。
52
58
 
53
59
  根本的なところから間違っているのでしょうか。調べ方もわからず困っています。
54
60