質問編集履歴

7

ja.ymlファイルを編集しました。

2020/04/27 07:39

投稿

tellmeshy
tellmeshy

スコア1

test CHANGED
File without changes
test CHANGED
@@ -120,6 +120,28 @@
120
120
 
121
121
  ```ja.yml
122
122
 
123
+ --2020-04-19 17:32:17-- https://raw.githubusercontent.com/svenfuchs/rails-i18n/master/rails/locale/ja.yml
124
+
125
+ raw.githubusercontent.com (raw.githubusercontent.com) をDNSに問いあわせています... 151.101.88.133
126
+
127
+ raw.githubusercontent.com (raw.githubusercontent.com)|151.101.88.133|:443 に接続しています... 接続しました。
128
+
129
+ HTTP による接続要求を送信しました、応答を待っています... 200 OK
130
+
131
+ 長さ: 5117 (5.0K) [text/plain]
132
+
133
+ "ja.yml" に保存中
134
+
135
+
136
+
137
+ 0K .... 100% 24.3M=0s
138
+
139
+
140
+
141
+ 2020-04-19 17:32:17 (24.3 MB/s) - `ja.yml' へ保存完了 [5117/5117]
142
+
143
+
144
+
123
145
  ja:
124
146
 
125
147
  activerecord:
@@ -128,7 +150,7 @@
128
150
 
129
151
  messages:
130
152
 
131
- record_invalid: 'バリデーションに失敗しました: %{errors}'
153
+ record_invalid: "バリデーションに失敗しました: %{errors}"
132
154
 
133
155
  restrict_dependent_destroy:
134
156
 
@@ -136,419 +158,37 @@
136
158
 
137
159
  has_many: "%{record}が存在しているので削除できません"
138
160
 
139
- models:
140
-
141
- task: タスク
142
-
143
- attributes:
144
-
145
- task:
146
-
147
- id: ID
148
-
149
- name: 名称
150
-
151
- description: 詳しい説明
152
-
153
- created_at: 登録日時
154
-
155
- updated_at: 更新日時
156
-
157
- date:
158
-
159
- abbr_day_names:
160
-
161
- -
162
-
163
- -
164
-
165
- -
166
-
167
- -
168
-
169
- -
170
-
171
- - 金
172
-
173
- - 土
174
-
175
- abbr_month_names:
176
-
177
- -
178
-
179
- - 1月
180
-
181
- - 2月
182
-
183
- - 3月
184
-
185
- - 4月
186
-
187
- - 5月
188
-
189
- - 6月
190
-
191
- - 7月
192
-
193
- - 8月
194
-
195
- - 9月
196
-
197
- - 10月
198
-
199
- - 11月
200
-
201
- - 12月
202
-
203
- day_names:
204
-
205
- - 日曜日
206
-
207
- - 月曜日
208
-
209
- - 火曜日
210
-
211
- - 水曜日
212
-
213
- - 木曜日
214
-
215
- - 金曜日
216
-
217
- - 土曜日
218
-
219
- formats:
220
-
221
- default: "%Y/%m/%d"
222
-
223
- long: "%Y年%m月%d日(%a)"
224
-
225
- short: "%m/%d"
226
-
227
- month_names:
228
-
229
- -
230
-
231
- - 1月
232
-
233
- - 2月
234
-
235
- - 3月
236
-
237
- - 4月
238
-
239
- - 5月
240
-
241
- - 6月
242
-
243
- - 7月
244
-
245
- - 8月
246
-
247
- - 9月
248
-
249
- - 10月
250
-
251
- - 11月
252
-
253
- - 12月
254
-
255
- order:
256
-
257
- - :year
258
-
259
- - :month
260
-
261
- - :day
262
-
263
- datetime:
264
-
265
- distance_in_words:
266
-
267
- about_x_hours:
268
-
269
- one: 約1時間
270
-
271
- other: 約%{count}時間
272
-
273
- about_x_months:
274
-
275
- one: 約1ヶ月
276
-
277
- other: 約%{count}ヶ月
278
-
279
- about_x_years:
280
-
281
- one: 約1年
282
-
283
- other: 約%{count}年
284
-
285
- almost_x_years:
286
-
287
- one: 1年弱
288
-
289
- other: "%{count}年弱"
290
-
291
- half_a_minute: 30秒前後
292
-
293
- less_than_x_seconds:
294
-
295
- one: 1秒以内
296
-
297
- other: "%{count}秒未満"
298
-
299
- less_than_x_minutes:
300
-
301
- one: 1分以内
302
-
303
- other: "%{count}分未満"
304
-
305
- over_x_years:
306
-
307
- one: 1年以上
308
-
309
- other: "%{count}年以上"
310
-
311
- x_seconds:
312
-
313
- one: 1秒
314
-
315
- other: "%{count}秒"
316
-
317
- x_minutes:
318
-
319
- one: 1分
320
-
321
- other: "%{count}分"
322
-
323
- x_days:
324
-
325
- one: 1日
326
-
327
- other: "%{count}日"
328
-
329
- x_months:
330
-
331
- one: 1ヶ月
332
-
333
- other: "%{count}ヶ月"
334
-
335
- x_years:
336
-
337
- one: 1年
338
-
339
- other: "%{count}年"
340
-
341
- prompts:
342
-
343
- second: 秒
344
-
345
- minute: 分
346
-
347
- hour: 時
348
-
349
- day: 日
350
-
351
- month: 月
352
-
353
- year: 年
354
-
355
- errors:
356
-
357
- format: "%{attribute}%{message}"
358
-
359
- messages:
360
-
361
- accepted: を受諾してください
362
-
363
- blank: を入力してください
364
-
365
- confirmation: と%{attribute}の入力が一致しません
366
-
367
- empty: を入力してください
368
-
369
- equal_to: は%{count}にしてください
370
-
371
- even: は偶数にしてください
372
-
373
- exclusion: は予約されています
374
-
375
- greater_than: は%{count}より大きい値にしてください
376
-
377
- greater_than_or_equal_to: は%{count}以上の値にしてください
378
-
379
- inclusion: は一覧にありません
380
-
381
- invalid: は不正な値です
382
-
383
- less_than: は%{count}より小さい値にしてください
384
-
385
- less_than_or_equal_to: は%{count}以下の値にしてください
386
-
387
- model_invalid: 'バリデーションに失敗しました: %{errors}'
388
-
389
- not_a_number: は数値で入力してください
390
-
391
- not_an_integer: は整数で入力してください
392
-
393
- odd: は奇数にしてください
394
-
395
- other_than: は%{count}以外の値にしてください
396
-
397
- present: は入力しないでください
398
-
399
- required: を入力してください
400
-
401
- taken: はすでに存在します
402
-
403
- too_long: は%{count}文字以内で入力してください
404
-
405
- too_short: は%{count}文字以上で入力してください
406
-
407
- wrong_length: は%{count}文字で入力してください
408
-
409
- template:
410
-
411
- body: 次の項目を確認してください
412
-
413
- header:
414
-
415
- one: "%{model}にエラーが発生しました"
416
-
417
- other: "%{model}に%{count}個のエラーが発生しました"
418
-
419
- helpers:
420
-
421
- select:
422
-
423
- prompt: 選択してください
424
-
425
- submit:
426
-
427
- create: 登録する
428
-
429
- submit: 保存する
430
-
431
- update: 更新する
432
-
433
- number:
434
-
435
- currency:
436
-
437
- format:
438
-
439
- delimiter: ","
440
-
441
- format: "%n%u"
442
-
443
- precision: 0
444
-
445
- separator: "."
446
-
447
- significant: false
448
-
449
- strip_insignificant_zeros: false
450
-
451
- unit: 円
452
-
453
- format:
454
-
455
- delimiter: ","
456
-
457
- precision: 3
458
-
459
- separator: "."
460
-
461
- significant: false
462
-
463
- strip_insignificant_zeros: false
464
-
465
- human:
466
-
467
- decimal_units:
468
-
469
- format: "%n %u"
470
-
471
- units:
472
-
473
- billion: 十億
474
-
475
- million: 百万
476
-
477
- quadrillion: 千兆
478
-
479
- thousand: 千
480
-
481
- trillion: 兆
482
-
483
- unit: ''
484
-
485
- format:
486
-
487
- delimiter: ''
488
-
489
- precision: 3
490
-
491
- significant: true
492
-
493
- strip_insignificant_zeros: true
494
-
495
- storage_units:
496
-
497
- format: "%n%u"
498
-
499
- units:
500
-
501
- byte: バイト
502
-
503
- eb: EB
504
-
505
- gb: GB
506
-
507
- kb: KB
508
-
509
- mb: MB
510
-
511
- pb: PB
512
-
513
- tb: TB
514
-
515
- percentage:
516
-
517
- format:
518
-
519
- delimiter: ''
520
-
521
- format: "%n%"
522
-
523
- precision:
524
-
525
- format:
526
-
527
- delimiter: ''
528
-
529
- support:
530
-
531
- array:
532
-
533
- last_word_connector: "、"
534
-
535
- two_words_connector: "、"
536
-
537
- words_connector: "、"
538
-
539
- time:
540
-
541
- am: 午前
542
-
543
- formats:
544
-
545
- default: "%Y年%m月%d日(%a) %H時%M分%S秒 %z"
546
-
547
- long: "%Y/%m/%d %H:%M"
548
-
549
- short: "%m/%d %H:%M"
550
-
551
- pm: 午後
161
+ models:
162
+
163
+ task: タスク
164
+
165
+ attributes:
166
+
167
+ task:
168
+
169
+ id: ID
170
+
171
+ name: 名称
172
+
173
+ description: 詳しい説明
174
+
175
+ created_at: 登録日時
176
+
177
+ updated_at: 更新日時
178
+
179
+ helpers:
180
+
181
+ select:
182
+
183
+ prompt: 選択して下さい
184
+
185
+ submit:
186
+
187
+ create: 登録する
188
+
189
+ submit: 保存する
190
+
191
+ update: 更新する
552
192
 
553
193
  ```
554
194
 

6

ja.ymlの中身を全て削除した場合のエラーを添付、追加しました。

2020/04/27 07:39

投稿

tellmeshy
tellmeshy

スコア1

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  ```
18
18
 
19
- ActionView::Template::Error (can not load translations from /Users/Tsukahara/taskleaf/config/locales/ja.yml: #<Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 5 column 3>):
19
+ ActionView::Template::Error (can not load translations from /Users/・・・/taskleaf/config/locales/ja.yml: #<Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 5 column 3>):
20
20
 
21
21
  7:
22
22
 
@@ -42,6 +42,44 @@
42
42
 
43
43
 
44
44
 
45
+ ---以下、ja.ymlを全て削除したときのエラー
46
+
47
+ ```
48
+
49
+ ActionView::Template::Error (can not load translations from /Users/・・・/taskleaf/config/locales/ja.yml: #<Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 5 column 3>):
50
+
51
+ 7:
52
+
53
+ 8: = form_with model: @task, local: true do |f|
54
+
55
+ 9: .form-group
56
+
57
+ 10: = f.label :name
58
+
59
+ 11: = f.text_field :name, class: 'form-control', id: 'task_name'
60
+
61
+ 12: .form-group
62
+
63
+ 13: = f.label :description
64
+
65
+
66
+
67
+ app/views/tasks/new.html.slim:10
68
+
69
+ app/views/tasks/new.html.slim:8
70
+
71
+
72
+
73
+
74
+
75
+ ```
76
+
77
+ ---以上。
78
+
79
+
80
+
81
+
82
+
45
83
  ### 該当のソースコード
46
84
 
47
85
  ```new.html.silm

5

ja.ymlのファイルを消しましたが添付画像のエラーがブラウザに出力されました。

2020/04/27 04:21

投稿

tellmeshy
tellmeshy

スコア1

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- ### 前提・実現したいこと
1
+ ![イメージ説明](9610e6663b40b2e3e6bd692328ed1d55.png)### 前提・実現したいこと
2
2
 
3
3
 
4
4
 

4

ご回答を頂き本当にありがとうございます。頂いたアドバイスから修正して試したのですが新たなエラー?が出ました。また御助力頂けたら幸いです。

2020/04/27 01:29

投稿

tellmeshy
tellmeshy

スコア1

test CHANGED
@@ -1 +1 @@
1
- ActionView::SyntaxErrorInTemplateのエラーの解消法
1
+ I18n::InvalidLocaleDataのエラーの解消法
test CHANGED
File without changes

3

今度は別のエラー??が出ました。。。

2020/04/25 01:49

投稿

tellmeshy
tellmeshy

スコア1

test CHANGED
File without changes
test CHANGED
@@ -1,10 +1,10 @@
1
- ![イメージ説明](0227a3cd6a05bce0d8acc1be34646fc2.png)### 前提・実現したいこと
1
+ ### 前提・実現したいこと
2
2
 
3
3
 
4
4
 
5
5
  Ruby on Railsでタスク管理アプリケーションを作成している途中でタイトルのエラーが出ました。
6
6
 
7
- 過去の解決済みの質問を参考にlink_toの前にスペスを入れたりしました解決しませんでした。
7
+ エラーが直せません I18n::InvalidLocaleData in Tasks#new
8
8
 
9
9
 
10
10
 
@@ -16,117 +16,511 @@
16
16
 
17
17
  ```
18
18
 
19
- ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template: check h1 タスクの新規登録
19
+ ActionView::Template::Error (can not load translations from /Users/Tsukahara/taskleaf/config/locales/ja.yml: #<Psych::SyntaxError: (<unknown>): mapping values are not allowed in this context at line 5 column 3>):
20
+
21
+ 7:
22
+
23
+ 8: = form_with model: @task, local: true do |f|
24
+
25
+ 9: .form-group
26
+
27
+ 10: = f.label :name
28
+
29
+ 11: = f.text_field :name, class: 'form-control', id: 'task_name'
30
+
31
+ 12: .form-group
32
+
33
+ 13: = f.label :description
34
+
35
+
36
+
37
+ app/views/tasks/new.html.slim:10
38
+
39
+ app/views/tasks/new.html.slim:8
40
+
41
+ ```
42
+
43
+
44
+
45
+ ### 該当のソースコード
46
+
47
+ ```new.html.silm
48
+
49
+ h1 タスクの新規登録
50
+
51
+
52
+
53
+
20
54
 
21
55
  .nav.justify-content-end
22
56
 
23
- = link_to '一覧', tasks_path, class: 'nav-link'
57
+ = link_to '一覧', tasks_path, class: 'nav-link'
58
+
59
+
60
+
61
+
24
62
 
25
63
  = form_with model: @task, local: true do |f|
26
64
 
27
- .form-group
65
+ .form-group
28
66
 
29
67
  = f.label :name
30
68
 
31
69
  = f.text_field :name, class: 'form-control', id: 'task_name'
32
70
 
33
- .form-group
71
+ .form-group
34
-
72
+
35
- = f.label :description,  
73
+ = f.label :description
36
-
74
+
37
- = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
75
+ = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description'
38
-
76
+
39
- = f.submit nil, class: 'btn btn-primary'
77
+ = f.submit nil, class: 'btn btn-primary'
40
-
41
- ):
42
-
43
- 1: h1 タスクの新規登録
44
-
45
- 2: .nav.justify-content-end
46
-
47
- 3: = link_to '一覧', tasks_path, class: 'nav-link'
48
-
49
- 4: = form_with model: @task, local: true do |f|
50
-
51
- 5: .form-group
52
-
53
- 6: = f.label :name
54
-
55
- 7: = f.text_field :name, class: 'form-control', id: 'task_name'
56
-
57
- 8: .form-group
58
-
59
- 9: = f.label :description,  
60
-
61
- 10: = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
62
-
63
- 11: = f.submit nil, class: 'btn btn-primary'
64
-
65
-
66
-
67
- app/views/tasks/new.html.slim:11: syntax error, unexpected '='
68
-
69
- app/views/tasks/new.html.slim:11: syntax error, unexpected '='
70
-
71
- app/views/tasks/new.html.slim:11: syntax error, unexpected '='
72
-
73
- app/views/tasks/new.html.slim:11: syntax error, unexpected '='
74
-
75
- app/views/tasks/new.html.slim:11: syntax error, unexpected '='
76
-
77
- app/views/tasks/new.html.slim:11: syntax error, unexpected '='
78
78
 
79
79
  ```
80
80
 
81
81
 
82
82
 
83
+ ```ja.yml
84
+
85
+ ja:
86
+
83
- ### 該当のソースコード
87
+ activerecord:
88
+
89
+ errors:
90
+
91
+ messages:
92
+
93
+ record_invalid: 'バリデーションに失敗しました: %{errors}'
94
+
95
+ restrict_dependent_destroy:
96
+
97
+ has_one: "%{record}が存在しているので削除できません"
98
+
99
+ has_many: "%{record}が存在しているので削除できません"
100
+
101
+ models:
102
+
103
+ task: タスク
104
+
105
+ attributes:
106
+
107
+ task:
108
+
109
+ id: ID
110
+
111
+ name: 名称
112
+
113
+ description: 詳しい説明
114
+
115
+ created_at: 登録日時
116
+
117
+ updated_at: 更新日時
118
+
119
+ date:
120
+
121
+ abbr_day_names:
122
+
123
+ - 日
124
+
125
+ - 月
126
+
127
+ - 火
128
+
129
+ - 水
130
+
131
+ - 木
132
+
133
+ - 金
134
+
135
+ - 土
136
+
137
+ abbr_month_names:
138
+
139
+ -
140
+
141
+ - 1月
142
+
143
+ - 2月
144
+
145
+ - 3月
146
+
147
+ - 4月
148
+
149
+ - 5月
150
+
151
+ - 6月
152
+
153
+ - 7月
154
+
155
+ - 8月
156
+
157
+ - 9月
158
+
159
+ - 10月
160
+
161
+ - 11月
162
+
163
+ - 12月
164
+
165
+ day_names:
166
+
167
+ - 日曜日
168
+
169
+ - 月曜日
170
+
171
+ - 火曜日
172
+
173
+ - 水曜日
174
+
175
+ - 木曜日
176
+
177
+ - 金曜日
178
+
179
+ - 土曜日
180
+
181
+ formats:
182
+
183
+ default: "%Y/%m/%d"
184
+
185
+ long: "%Y年%m月%d日(%a)"
186
+
187
+ short: "%m/%d"
188
+
189
+ month_names:
190
+
191
+ -
192
+
193
+ - 1月
194
+
195
+ - 2月
196
+
197
+ - 3月
198
+
199
+ - 4月
200
+
201
+ - 5月
202
+
203
+ - 6月
204
+
205
+ - 7月
206
+
207
+ - 8月
208
+
209
+ - 9月
210
+
211
+ - 10月
212
+
213
+ - 11月
214
+
215
+ - 12月
216
+
217
+ order:
218
+
219
+ - :year
220
+
221
+ - :month
222
+
223
+ - :day
224
+
225
+ datetime:
226
+
227
+ distance_in_words:
228
+
229
+ about_x_hours:
230
+
231
+ one: 約1時間
232
+
233
+ other: 約%{count}時間
234
+
235
+ about_x_months:
236
+
237
+ one: 約1ヶ月
238
+
239
+ other: 約%{count}ヶ月
240
+
241
+ about_x_years:
242
+
243
+ one: 約1年
244
+
245
+ other: 約%{count}年
246
+
247
+ almost_x_years:
248
+
249
+ one: 1年弱
250
+
251
+ other: "%{count}年弱"
252
+
253
+ half_a_minute: 30秒前後
254
+
255
+ less_than_x_seconds:
256
+
257
+ one: 1秒以内
258
+
259
+ other: "%{count}秒未満"
260
+
261
+ less_than_x_minutes:
262
+
263
+ one: 1分以内
264
+
265
+ other: "%{count}分未満"
266
+
267
+ over_x_years:
268
+
269
+ one: 1年以上
270
+
271
+ other: "%{count}年以上"
272
+
273
+ x_seconds:
274
+
275
+ one: 1秒
276
+
277
+ other: "%{count}秒"
278
+
279
+ x_minutes:
280
+
281
+ one: 1分
282
+
283
+ other: "%{count}分"
284
+
285
+ x_days:
286
+
287
+ one: 1日
288
+
289
+ other: "%{count}日"
290
+
291
+ x_months:
292
+
293
+ one: 1ヶ月
294
+
295
+ other: "%{count}ヶ月"
296
+
297
+ x_years:
298
+
299
+ one: 1年
300
+
301
+ other: "%{count}年"
302
+
303
+ prompts:
304
+
305
+ second: 秒
306
+
307
+ minute: 分
308
+
309
+ hour: 時
310
+
311
+ day: 日
312
+
313
+ month: 月
314
+
315
+ year: 年
316
+
317
+ errors:
318
+
319
+ format: "%{attribute}%{message}"
320
+
321
+ messages:
322
+
323
+ accepted: を受諾してください
324
+
325
+ blank: を入力してください
326
+
327
+ confirmation: と%{attribute}の入力が一致しません
328
+
329
+ empty: を入力してください
330
+
331
+ equal_to: は%{count}にしてください
332
+
333
+ even: は偶数にしてください
334
+
335
+ exclusion: は予約されています
336
+
337
+ greater_than: は%{count}より大きい値にしてください
338
+
339
+ greater_than_or_equal_to: は%{count}以上の値にしてください
340
+
341
+ inclusion: は一覧にありません
342
+
343
+ invalid: は不正な値です
344
+
345
+ less_than: は%{count}より小さい値にしてください
346
+
347
+ less_than_or_equal_to: は%{count}以下の値にしてください
348
+
349
+ model_invalid: 'バリデーションに失敗しました: %{errors}'
350
+
351
+ not_a_number: は数値で入力してください
352
+
353
+ not_an_integer: は整数で入力してください
354
+
355
+ odd: は奇数にしてください
356
+
357
+ other_than: は%{count}以外の値にしてください
358
+
359
+ present: は入力しないでください
360
+
361
+ required: を入力してください
362
+
363
+ taken: はすでに存在します
364
+
365
+ too_long: は%{count}文字以内で入力してください
366
+
367
+ too_short: は%{count}文字以上で入力してください
368
+
369
+ wrong_length: は%{count}文字で入力してください
370
+
371
+ template:
372
+
373
+ body: 次の項目を確認してください
374
+
375
+ header:
376
+
377
+ one: "%{model}にエラーが発生しました"
378
+
379
+ other: "%{model}に%{count}個のエラーが発生しました"
380
+
381
+ helpers:
382
+
383
+ select:
384
+
385
+ prompt: 選択してください
386
+
387
+ submit:
388
+
389
+ create: 登録する
390
+
391
+ submit: 保存する
392
+
393
+ update: 更新する
394
+
395
+ number:
396
+
397
+ currency:
398
+
399
+ format:
400
+
401
+ delimiter: ","
402
+
403
+ format: "%n%u"
404
+
405
+ precision: 0
406
+
407
+ separator: "."
408
+
409
+ significant: false
410
+
411
+ strip_insignificant_zeros: false
412
+
413
+ unit: 円
414
+
415
+ format:
416
+
417
+ delimiter: ","
418
+
419
+ precision: 3
420
+
421
+ separator: "."
422
+
423
+ significant: false
424
+
425
+ strip_insignificant_zeros: false
426
+
427
+ human:
428
+
429
+ decimal_units:
430
+
431
+ format: "%n %u"
432
+
433
+ units:
434
+
435
+ billion: 十億
436
+
437
+ million: 百万
438
+
439
+ quadrillion: 千兆
440
+
441
+ thousand: 千
442
+
443
+ trillion: 兆
444
+
445
+ unit: ''
446
+
447
+ format:
448
+
449
+ delimiter: ''
450
+
451
+ precision: 3
452
+
453
+ significant: true
454
+
455
+ strip_insignificant_zeros: true
456
+
457
+ storage_units:
458
+
459
+ format: "%n%u"
460
+
461
+ units:
462
+
463
+ byte: バイト
464
+
465
+ eb: EB
466
+
467
+ gb: GB
468
+
469
+ kb: KB
470
+
471
+ mb: MB
472
+
473
+ pb: PB
474
+
475
+ tb: TB
476
+
477
+ percentage:
478
+
479
+ format:
480
+
481
+ delimiter: ''
482
+
483
+ format: "%n%"
484
+
485
+ precision:
486
+
487
+ format:
488
+
489
+ delimiter: ''
490
+
491
+ support:
492
+
493
+ array:
494
+
495
+ last_word_connector: "、"
496
+
497
+ two_words_connector: "、"
498
+
499
+ words_connector: "、"
500
+
501
+ time:
502
+
503
+ am: 午前
504
+
505
+ formats:
506
+
507
+ default: "%Y年%m月%d日(%a) %H時%M分%S秒 %z"
508
+
509
+ long: "%Y/%m/%d %H:%M"
510
+
511
+ short: "%m/%d %H:%M"
512
+
513
+ pm: 午後
84
514
 
85
515
  ```
86
516
 
87
- h1 タスクの新規登録
88
-
89
- ```
90
-
91
- ```
92
-
93
- .nav.justify-content-end
94
-
95
- = link_to '一覧', tasks_path, class: 'nav-link'
96
-
97
- = form_with model: @task, local: true do |f|
98
-
99
- ```
100
-
101
- ```
102
-
103
- .form-group
104
-
105
- = f.label :name
106
-
107
- = f.text_field :name, class: 'form-control', id: 'task_name'
108
-
109
- ```
110
-
111
- ```
112
-
113
- .form-group
114
-
115
- = f.label :description,  
116
-
117
- = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
118
-
119
- = f.submit nil, class: 'btn btn-primary'
120
-
121
- ```
122
-
123
517
 
124
518
 
125
519
  ### 試したこと
126
520
 
127
521
 
128
522
 
129
- いろいろところスペースを入れ「,」を入れるなどしました。
523
+ インデントど徹底的意識しまし今度は別のエラー?が出ました。
130
524
 
131
525
 
132
526
 

2

やはり同じようなエラーが出ます。参考になるかどうか分かりませんがVisual Studio Codeのスクショを貼り付けます。

2020/04/25 00:29

投稿

tellmeshy
tellmeshy

スコア1

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- ### 前提・実現したいこと
1
+ ![イメージ説明](0227a3cd6a05bce0d8acc1be34646fc2.png)### 前提・実現したいこと
2
2
 
3
3
 
4
4
 
@@ -18,85 +18,63 @@
18
18
 
19
19
  ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template: check h1 タスクの新規登録
20
20
 
21
-
22
-
23
21
  .nav.justify-content-end
24
22
 
25
- = link_to '一覧', tasks_path, class: 'nav-link'
23
+ = link_to '一覧', tasks_path, class: 'nav-link'
26
24
 
27
-
28
-
29
- = form_with model: @task, local: true do |f|
25
+ = form_with model: @task, local: true do |f|
30
26
 
31
27
  .form-group
32
28
 
33
- = f.label :name
29
+ = f.label :name
34
30
 
35
- = f.text_field :name,
36
-
37
- class: 'form-control',
31
+ = f.text_field :name, class: 'form-control', id: 'task_name'
38
-
39
- id: 'task_name'
40
32
 
41
33
  .form-group
42
34
 
43
- = f.label :description,  
35
+ = f.label :description,  
44
36
 
45
- = f.text_area :description, rows: 5, class: 'form-control',
37
+ = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
46
38
 
47
- id: 'task_description',
48
-
49
- = f.submit nil, class: 'btn btn-primary'
39
+ = f.submit nil, class: 'btn btn-primary'
50
-
51
-
52
40
 
53
41
  ):
54
42
 
55
43
  1: h1 タスクの新規登録
56
44
 
57
- 2:
45
+ 2: .nav.justify-content-end
58
46
 
59
- 3: .nav.justify-content-end
47
+ 3: = link_to '一覧', tasks_path, class: 'nav-link'
60
48
 
61
- 4: = link_to '一覧', tasks_path, class: 'nav-link'
49
+ 4: = form_with model: @task, local: true do |f|
62
50
 
63
- 5:
51
+ 5: .form-group
64
52
 
65
- 6: = form_with model: @task, local: true do |f|
53
+ 6: = f.label :name
66
54
 
67
- 7: .form-group
55
+ 7: = f.text_field :name, class: 'form-control', id: 'task_name'
68
56
 
69
- 8: = f.label :name
57
+ 8: .form-group
70
58
 
71
- 9: = f.text_field :name,
59
+ 9: = f.label :description,  
72
60
 
73
- 10: class: 'form-control',
61
+ 10: = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
74
62
 
75
- 11: id: 'task_name'
76
-
77
- 12: .form-group
78
-
79
- 13: = f.label :description,  
80
-
81
- 14: = f.text_area :description, rows: 5, class: 'form-control',
82
-
83
- 15: id: 'task_description',
84
-
85
- 16: = f.submit nil, class: 'btn btn-primary'
63
+ 11: = f.submit nil, class: 'btn btn-primary'
86
64
 
87
65
 
88
66
 
89
- app/views/tasks/new.html.slim:16: syntax error, unexpected '='
67
+ app/views/tasks/new.html.slim:11: syntax error, unexpected '='
90
68
 
91
- app/views/tasks/new.html.slim:16: syntax error, unexpected '='
69
+ app/views/tasks/new.html.slim:11: syntax error, unexpected '='
92
70
 
93
- app/views/tasks/new.html.slim:16: syntax error, unexpected '='
71
+ app/views/tasks/new.html.slim:11: syntax error, unexpected '='
94
72
 
95
- app/views/tasks/new.html.slim:16: syntax error, unexpected '='
73
+ app/views/tasks/new.html.slim:11: syntax error, unexpected '='
96
74
 
97
- app/views/tasks/new.html.slim:16: syntax error, unexpected '='
75
+ app/views/tasks/new.html.slim:11: syntax error, unexpected '='
98
76
 
99
- app/views/tasks/new.html.slim:16: syntax error, unexpected '='
77
+ app/views/tasks/new.html.slim:11: syntax error, unexpected '='
100
78
 
101
79
  ```
102
80
 

1

当方勉強し始めたばかりの初心者ですので何もわかっておらず大変申し訳ありません。コードブロックを追加しました。```の入れ方があっているかどうか分かりませんがご助言頂けると助かります。

2020/04/23 14:55

投稿

tellmeshy
tellmeshy

スコア1

test CHANGED
File without changes
test CHANGED
@@ -13,6 +13,8 @@
13
13
  ### 発生している問題・エラーメッセージ
14
14
 
15
15
 
16
+
17
+ ```
16
18
 
17
19
  ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template: check h1 タスクの新規登録
18
20
 
@@ -96,43 +98,49 @@
96
98
 
97
99
  app/views/tasks/new.html.slim:16: syntax error, unexpected '='
98
100
 
101
+ ```
102
+
99
103
 
100
104
 
101
105
  ### 該当のソースコード
102
106
 
103
-
107
+ ```
104
108
 
105
109
  h1 タスクの新規登録
106
110
 
111
+ ```
107
112
 
113
+ ```
108
114
 
109
115
  .nav.justify-content-end
110
116
 
111
117
  = link_to '一覧', tasks_path, class: 'nav-link'
112
118
 
119
+ = form_with model: @task, local: true do |f|
113
120
 
121
+ ```
114
122
 
115
- = form_with model: @task, local: true do |f|
123
+ ```
116
124
 
117
125
  .form-group
118
126
 
119
127
  = f.label :name
120
128
 
121
- = f.text_field :name,
129
+ = f.text_field :name, class: 'form-control', id: 'task_name'
122
130
 
123
- class: 'form-control',
131
+ ```
124
132
 
125
- id: 'task_name'
133
+ ```
126
134
 
127
135
  .form-group
128
136
 
129
137
  = f.label :description,  
130
138
 
131
- = f.text_area :description, rows: 5, class: 'form-control',
139
+ = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
132
-
133
- id: 'task_description',
134
140
 
135
141
  = f.submit nil, class: 'btn btn-primary'
142
+
143
+ ```
136
144
 
137
145
 
138
146