質問編集履歴
7
ja.ymlファイルを編集しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -59,221 +59,41 @@
|
|
59
59
|
```
|
60
60
|
|
61
61
|
```ja.yml
|
62
|
+
--2020-04-19 17:32:17-- https://raw.githubusercontent.com/svenfuchs/rails-i18n/master/rails/locale/ja.yml
|
63
|
+
raw.githubusercontent.com (raw.githubusercontent.com) をDNSに問いあわせています... 151.101.88.133
|
64
|
+
raw.githubusercontent.com (raw.githubusercontent.com)|151.101.88.133|:443 に接続しています... 接続しました。
|
65
|
+
HTTP による接続要求を送信しました、応答を待っています... 200 OK
|
66
|
+
長さ: 5117 (5.0K) [text/plain]
|
67
|
+
"ja.yml" に保存中
|
68
|
+
|
69
|
+
0K .... 100% 24.3M=0s
|
70
|
+
|
71
|
+
2020-04-19 17:32:17 (24.3 MB/s) - `ja.yml' へ保存完了 [5117/5117]
|
72
|
+
|
62
73
|
ja:
|
63
74
|
activerecord:
|
64
75
|
errors:
|
65
76
|
messages:
|
66
|
-
record_invalid:
|
77
|
+
record_invalid: "バリデーションに失敗しました: %{errors}"
|
67
78
|
restrict_dependent_destroy:
|
68
79
|
has_one: "%{record}が存在しているので削除できません"
|
69
80
|
has_many: "%{record}が存在しているので削除できません"
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
- 金
|
87
|
-
- 土
|
88
|
-
abbr_month_names:
|
89
|
-
-
|
90
|
-
- 1月
|
91
|
-
- 2月
|
92
|
-
- 3月
|
93
|
-
- 4月
|
94
|
-
- 5月
|
95
|
-
- 6月
|
96
|
-
- 7月
|
97
|
-
- 8月
|
98
|
-
- 9月
|
99
|
-
- 10月
|
100
|
-
- 11月
|
101
|
-
- 12月
|
102
|
-
day_names:
|
103
|
-
- 日曜日
|
104
|
-
- 月曜日
|
105
|
-
- 火曜日
|
106
|
-
- 水曜日
|
107
|
-
- 木曜日
|
108
|
-
- 金曜日
|
109
|
-
- 土曜日
|
110
|
-
formats:
|
111
|
-
default: "%Y/%m/%d"
|
112
|
-
long: "%Y年%m月%d日(%a)"
|
113
|
-
short: "%m/%d"
|
114
|
-
month_names:
|
115
|
-
-
|
116
|
-
- 1月
|
117
|
-
- 2月
|
118
|
-
- 3月
|
119
|
-
- 4月
|
120
|
-
- 5月
|
121
|
-
- 6月
|
122
|
-
- 7月
|
123
|
-
- 8月
|
124
|
-
- 9月
|
125
|
-
- 10月
|
126
|
-
- 11月
|
127
|
-
- 12月
|
128
|
-
order:
|
129
|
-
- :year
|
130
|
-
- :month
|
131
|
-
- :day
|
132
|
-
datetime:
|
133
|
-
distance_in_words:
|
134
|
-
about_x_hours:
|
135
|
-
one: 約1時間
|
136
|
-
other: 約%{count}時間
|
137
|
-
about_x_months:
|
138
|
-
one: 約1ヶ月
|
139
|
-
other: 約%{count}ヶ月
|
140
|
-
about_x_years:
|
141
|
-
one: 約1年
|
142
|
-
other: 約%{count}年
|
143
|
-
almost_x_years:
|
144
|
-
one: 1年弱
|
145
|
-
other: "%{count}年弱"
|
146
|
-
half_a_minute: 30秒前後
|
147
|
-
less_than_x_seconds:
|
148
|
-
one: 1秒以内
|
149
|
-
other: "%{count}秒未満"
|
150
|
-
less_than_x_minutes:
|
151
|
-
one: 1分以内
|
152
|
-
other: "%{count}分未満"
|
153
|
-
over_x_years:
|
154
|
-
one: 1年以上
|
155
|
-
other: "%{count}年以上"
|
156
|
-
x_seconds:
|
157
|
-
one: 1秒
|
158
|
-
other: "%{count}秒"
|
159
|
-
x_minutes:
|
160
|
-
one: 1分
|
161
|
-
other: "%{count}分"
|
162
|
-
x_days:
|
163
|
-
one: 1日
|
164
|
-
other: "%{count}日"
|
165
|
-
x_months:
|
166
|
-
one: 1ヶ月
|
167
|
-
other: "%{count}ヶ月"
|
168
|
-
x_years:
|
169
|
-
one: 1年
|
170
|
-
other: "%{count}年"
|
171
|
-
prompts:
|
172
|
-
second: 秒
|
173
|
-
minute: 分
|
174
|
-
hour: 時
|
175
|
-
day: 日
|
176
|
-
month: 月
|
177
|
-
year: 年
|
178
|
-
errors:
|
179
|
-
format: "%{attribute}%{message}"
|
180
|
-
messages:
|
181
|
-
accepted: を受諾してください
|
182
|
-
blank: を入力してください
|
183
|
-
confirmation: と%{attribute}の入力が一致しません
|
184
|
-
empty: を入力してください
|
185
|
-
equal_to: は%{count}にしてください
|
186
|
-
even: は偶数にしてください
|
187
|
-
exclusion: は予約されています
|
188
|
-
greater_than: は%{count}より大きい値にしてください
|
189
|
-
greater_than_or_equal_to: は%{count}以上の値にしてください
|
190
|
-
inclusion: は一覧にありません
|
191
|
-
invalid: は不正な値です
|
192
|
-
less_than: は%{count}より小さい値にしてください
|
193
|
-
less_than_or_equal_to: は%{count}以下の値にしてください
|
194
|
-
model_invalid: 'バリデーションに失敗しました: %{errors}'
|
195
|
-
not_a_number: は数値で入力してください
|
196
|
-
not_an_integer: は整数で入力してください
|
197
|
-
odd: は奇数にしてください
|
198
|
-
other_than: は%{count}以外の値にしてください
|
199
|
-
present: は入力しないでください
|
200
|
-
required: を入力してください
|
201
|
-
taken: はすでに存在します
|
202
|
-
too_long: は%{count}文字以内で入力してください
|
203
|
-
too_short: は%{count}文字以上で入力してください
|
204
|
-
wrong_length: は%{count}文字で入力してください
|
205
|
-
template:
|
206
|
-
body: 次の項目を確認してください
|
207
|
-
header:
|
208
|
-
one: "%{model}にエラーが発生しました"
|
209
|
-
other: "%{model}に%{count}個のエラーが発生しました"
|
210
|
-
helpers:
|
211
|
-
select:
|
212
|
-
prompt: 選択してください
|
213
|
-
submit:
|
214
|
-
create: 登録する
|
215
|
-
submit: 保存する
|
216
|
-
update: 更新する
|
217
|
-
number:
|
218
|
-
currency:
|
219
|
-
format:
|
220
|
-
delimiter: ","
|
221
|
-
format: "%n%u"
|
222
|
-
precision: 0
|
223
|
-
separator: "."
|
224
|
-
significant: false
|
225
|
-
strip_insignificant_zeros: false
|
226
|
-
unit: 円
|
227
|
-
format:
|
228
|
-
delimiter: ","
|
229
|
-
precision: 3
|
230
|
-
separator: "."
|
231
|
-
significant: false
|
232
|
-
strip_insignificant_zeros: false
|
233
|
-
human:
|
234
|
-
decimal_units:
|
235
|
-
format: "%n %u"
|
236
|
-
units:
|
237
|
-
billion: 十億
|
238
|
-
million: 百万
|
239
|
-
quadrillion: 千兆
|
240
|
-
thousand: 千
|
241
|
-
trillion: 兆
|
242
|
-
unit: ''
|
243
|
-
format:
|
244
|
-
delimiter: ''
|
245
|
-
precision: 3
|
246
|
-
significant: true
|
247
|
-
strip_insignificant_zeros: true
|
248
|
-
storage_units:
|
249
|
-
format: "%n%u"
|
250
|
-
units:
|
251
|
-
byte: バイト
|
252
|
-
eb: EB
|
253
|
-
gb: GB
|
254
|
-
kb: KB
|
255
|
-
mb: MB
|
256
|
-
pb: PB
|
257
|
-
tb: TB
|
258
|
-
percentage:
|
259
|
-
format:
|
260
|
-
delimiter: ''
|
261
|
-
format: "%n%"
|
262
|
-
precision:
|
263
|
-
format:
|
264
|
-
delimiter: ''
|
265
|
-
support:
|
266
|
-
array:
|
267
|
-
last_word_connector: "、"
|
268
|
-
two_words_connector: "、"
|
269
|
-
words_connector: "、"
|
270
|
-
time:
|
271
|
-
am: 午前
|
272
|
-
formats:
|
273
|
-
default: "%Y年%m月%d日(%a) %H時%M分%S秒 %z"
|
274
|
-
long: "%Y/%m/%d %H:%M"
|
275
|
-
short: "%m/%d %H:%M"
|
276
|
-
pm: 午後
|
81
|
+
models:
|
82
|
+
task: タスク
|
83
|
+
attributes:
|
84
|
+
task:
|
85
|
+
id: ID
|
86
|
+
name: 名称
|
87
|
+
description: 詳しい説明
|
88
|
+
created_at: 登録日時
|
89
|
+
updated_at: 更新日時
|
90
|
+
helpers:
|
91
|
+
select:
|
92
|
+
prompt: 選択して下さい
|
93
|
+
submit:
|
94
|
+
create: 登録する
|
95
|
+
submit: 保存する
|
96
|
+
update: 更新する
|
277
97
|
```
|
278
98
|
|
279
99
|
### 試したこと
|
6
ja.ymlの中身を全て削除した場合のエラーを添付、追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
### 発生している問題・エラーメッセージ
|
8
8
|
|
9
9
|
```
|
10
|
-
ActionView::Template::Error (can not load translations from /Users/
|
10
|
+
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>):
|
11
11
|
7:
|
12
12
|
8: = form_with model: @task, local: true do |f|
|
13
13
|
9: .form-group
|
@@ -20,6 +20,25 @@
|
|
20
20
|
app/views/tasks/new.html.slim:8
|
21
21
|
```
|
22
22
|
|
23
|
+
---以下、ja.ymlを全て削除したときのエラー
|
24
|
+
```
|
25
|
+
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>):
|
26
|
+
7:
|
27
|
+
8: = form_with model: @task, local: true do |f|
|
28
|
+
9: .form-group
|
29
|
+
10: = f.label :name
|
30
|
+
11: = f.text_field :name, class: 'form-control', id: 'task_name'
|
31
|
+
12: .form-group
|
32
|
+
13: = f.label :description
|
33
|
+
|
34
|
+
app/views/tasks/new.html.slim:10
|
35
|
+
app/views/tasks/new.html.slim:8
|
36
|
+
|
37
|
+
|
38
|
+
```
|
39
|
+
---以上。
|
40
|
+
|
41
|
+
|
23
42
|
### 該当のソースコード
|
24
43
|
```new.html.silm
|
25
44
|
h1 タスクの新規登録
|
5
ja.ymlのファイルを消しましたが添付画像のエラーがブラウザに出力されました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
### 前提・実現したいこと
|
1
|
+
### 前提・実現したいこと
|
2
2
|
|
3
3
|
Ruby on Railsでタスク管理アプリケーションを作成している途中でタイトルのエラーが出ました。
|
4
4
|
エラーが直せません I18n::InvalidLocaleData in Tasks#new
|
4
ご回答を頂き本当にありがとうございます。頂いたアドバイスから修正して試したのですが新たなエラー?が出ました。また御助力頂けたら幸いです。
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
I18n::InvalidLocaleDataのエラーの解消法
|
body
CHANGED
File without changes
|
3
今度は別のエラー??が出ました。。。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,68 +1,265 @@
|
|
1
|
-
|
1
|
+
### 前提・実現したいこと
|
2
2
|
|
3
3
|
Ruby on Railsでタスク管理アプリケーションを作成している途中でタイトルのエラーが出ました。
|
4
|
-
|
4
|
+
エラーが直せません I18n::InvalidLocaleData in Tasks#new
|
5
5
|
|
6
6
|
|
7
7
|
### 発生している問題・エラーメッセージ
|
8
8
|
|
9
9
|
```
|
10
|
-
ActionView::
|
11
|
-
|
12
|
-
=
|
13
|
-
|
14
|
-
.
|
15
|
-
= f.
|
16
|
-
|
17
|
-
.
|
18
|
-
= f.label :description,
|
19
|
-
= f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
|
20
|
-
= f.submit nil, class: 'btn btn-primary'
|
21
|
-
):
|
22
|
-
1: h1 タスクの新規登録
|
23
|
-
2: .nav.justify-content-end
|
24
|
-
3: = link_to '一覧', tasks_path, class: 'nav-link'
|
25
|
-
4: = form_with model: @task, local: true do |f|
|
26
|
-
5: .form-group
|
27
|
-
6: = f.label :name
|
28
|
-
7: = f.text_field :name, class: 'form-control', id: 'task_name'
|
29
|
-
8: .form-group
|
30
|
-
9: = f.label :description,
|
31
|
-
10: = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
|
32
|
-
11: = f.submit nil, class: 'btn btn-primary'
|
10
|
+
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>):
|
11
|
+
7:
|
12
|
+
8: = form_with model: @task, local: true do |f|
|
13
|
+
9: .form-group
|
14
|
+
10: = f.label :name
|
15
|
+
11: = f.text_field :name, class: 'form-control', id: 'task_name'
|
16
|
+
12: .form-group
|
17
|
+
13: = f.label :description
|
33
18
|
|
34
|
-
app/views/tasks/new.html.slim:
|
19
|
+
app/views/tasks/new.html.slim:10
|
35
|
-
app/views/tasks/new.html.slim:
|
20
|
+
app/views/tasks/new.html.slim:8
|
36
|
-
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
37
|
-
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
38
|
-
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
39
|
-
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
40
21
|
```
|
41
22
|
|
42
23
|
### 該当のソースコード
|
43
|
-
```
|
24
|
+
```new.html.silm
|
44
25
|
h1 タスクの新規登録
|
45
|
-
|
26
|
+
|
46
|
-
|
27
|
+
|
47
28
|
.nav.justify-content-end
|
48
|
-
|
29
|
+
= link_to '一覧', tasks_path, class: 'nav-link'
|
30
|
+
|
31
|
+
|
49
|
-
=
|
32
|
+
= form_with model: @task, local: true do |f|
|
33
|
+
.form-group
|
34
|
+
= f.label :name
|
35
|
+
= f.text_field :name, class: 'form-control', id: 'task_name'
|
36
|
+
.form-group
|
37
|
+
= f.label :description
|
38
|
+
= f.text_area :description, rows: 5, class: 'form-control', id: 'task_description'
|
39
|
+
= f.submit nil, class: 'btn btn-primary'
|
50
40
|
```
|
41
|
+
|
42
|
+
```ja.yml
|
43
|
+
ja:
|
44
|
+
activerecord:
|
45
|
+
errors:
|
46
|
+
messages:
|
47
|
+
record_invalid: 'バリデーションに失敗しました: %{errors}'
|
48
|
+
restrict_dependent_destroy:
|
49
|
+
has_one: "%{record}が存在しているので削除できません"
|
50
|
+
has_many: "%{record}が存在しているので削除できません"
|
51
|
+
models:
|
52
|
+
task: タスク
|
53
|
+
attributes:
|
54
|
+
task:
|
55
|
+
id: ID
|
56
|
+
name: 名称
|
57
|
+
description: 詳しい説明
|
58
|
+
created_at: 登録日時
|
59
|
+
updated_at: 更新日時
|
60
|
+
date:
|
61
|
+
abbr_day_names:
|
62
|
+
- 日
|
63
|
+
- 月
|
64
|
+
- 火
|
65
|
+
- 水
|
66
|
+
- 木
|
67
|
+
- 金
|
68
|
+
- 土
|
69
|
+
abbr_month_names:
|
70
|
+
-
|
71
|
+
- 1月
|
72
|
+
- 2月
|
73
|
+
- 3月
|
74
|
+
- 4月
|
75
|
+
- 5月
|
76
|
+
- 6月
|
77
|
+
- 7月
|
78
|
+
- 8月
|
79
|
+
- 9月
|
80
|
+
- 10月
|
81
|
+
- 11月
|
82
|
+
- 12月
|
83
|
+
day_names:
|
84
|
+
- 日曜日
|
85
|
+
- 月曜日
|
86
|
+
- 火曜日
|
87
|
+
- 水曜日
|
88
|
+
- 木曜日
|
89
|
+
- 金曜日
|
90
|
+
- 土曜日
|
91
|
+
formats:
|
92
|
+
default: "%Y/%m/%d"
|
93
|
+
long: "%Y年%m月%d日(%a)"
|
94
|
+
short: "%m/%d"
|
95
|
+
month_names:
|
96
|
+
-
|
97
|
+
- 1月
|
98
|
+
- 2月
|
99
|
+
- 3月
|
100
|
+
- 4月
|
101
|
+
- 5月
|
102
|
+
- 6月
|
103
|
+
- 7月
|
104
|
+
- 8月
|
105
|
+
- 9月
|
106
|
+
- 10月
|
107
|
+
- 11月
|
108
|
+
- 12月
|
109
|
+
order:
|
110
|
+
- :year
|
111
|
+
- :month
|
112
|
+
- :day
|
113
|
+
datetime:
|
114
|
+
distance_in_words:
|
115
|
+
about_x_hours:
|
116
|
+
one: 約1時間
|
117
|
+
other: 約%{count}時間
|
118
|
+
about_x_months:
|
119
|
+
one: 約1ヶ月
|
120
|
+
other: 約%{count}ヶ月
|
121
|
+
about_x_years:
|
122
|
+
one: 約1年
|
123
|
+
other: 約%{count}年
|
124
|
+
almost_x_years:
|
125
|
+
one: 1年弱
|
126
|
+
other: "%{count}年弱"
|
127
|
+
half_a_minute: 30秒前後
|
128
|
+
less_than_x_seconds:
|
129
|
+
one: 1秒以内
|
130
|
+
other: "%{count}秒未満"
|
131
|
+
less_than_x_minutes:
|
132
|
+
one: 1分以内
|
133
|
+
other: "%{count}分未満"
|
134
|
+
over_x_years:
|
135
|
+
one: 1年以上
|
136
|
+
other: "%{count}年以上"
|
137
|
+
x_seconds:
|
138
|
+
one: 1秒
|
139
|
+
other: "%{count}秒"
|
140
|
+
x_minutes:
|
141
|
+
one: 1分
|
142
|
+
other: "%{count}分"
|
143
|
+
x_days:
|
144
|
+
one: 1日
|
145
|
+
other: "%{count}日"
|
146
|
+
x_months:
|
147
|
+
one: 1ヶ月
|
148
|
+
other: "%{count}ヶ月"
|
149
|
+
x_years:
|
150
|
+
one: 1年
|
151
|
+
other: "%{count}年"
|
152
|
+
prompts:
|
153
|
+
second: 秒
|
154
|
+
minute: 分
|
155
|
+
hour: 時
|
156
|
+
day: 日
|
157
|
+
month: 月
|
158
|
+
year: 年
|
159
|
+
errors:
|
160
|
+
format: "%{attribute}%{message}"
|
161
|
+
messages:
|
162
|
+
accepted: を受諾してください
|
163
|
+
blank: を入力してください
|
164
|
+
confirmation: と%{attribute}の入力が一致しません
|
165
|
+
empty: を入力してください
|
166
|
+
equal_to: は%{count}にしてください
|
167
|
+
even: は偶数にしてください
|
168
|
+
exclusion: は予約されています
|
169
|
+
greater_than: は%{count}より大きい値にしてください
|
170
|
+
greater_than_or_equal_to: は%{count}以上の値にしてください
|
171
|
+
inclusion: は一覧にありません
|
172
|
+
invalid: は不正な値です
|
173
|
+
less_than: は%{count}より小さい値にしてください
|
174
|
+
less_than_or_equal_to: は%{count}以下の値にしてください
|
175
|
+
model_invalid: 'バリデーションに失敗しました: %{errors}'
|
176
|
+
not_a_number: は数値で入力してください
|
177
|
+
not_an_integer: は整数で入力してください
|
178
|
+
odd: は奇数にしてください
|
179
|
+
other_than: は%{count}以外の値にしてください
|
180
|
+
present: は入力しないでください
|
181
|
+
required: を入力してください
|
182
|
+
taken: はすでに存在します
|
183
|
+
too_long: は%{count}文字以内で入力してください
|
184
|
+
too_short: は%{count}文字以上で入力してください
|
185
|
+
wrong_length: は%{count}文字で入力してください
|
186
|
+
template:
|
187
|
+
body: 次の項目を確認してください
|
188
|
+
header:
|
189
|
+
one: "%{model}にエラーが発生しました"
|
190
|
+
other: "%{model}に%{count}個のエラーが発生しました"
|
191
|
+
helpers:
|
192
|
+
select:
|
193
|
+
prompt: 選択してください
|
194
|
+
submit:
|
195
|
+
create: 登録する
|
196
|
+
submit: 保存する
|
197
|
+
update: 更新する
|
198
|
+
number:
|
199
|
+
currency:
|
200
|
+
format:
|
201
|
+
delimiter: ","
|
202
|
+
format: "%n%u"
|
203
|
+
precision: 0
|
204
|
+
separator: "."
|
205
|
+
significant: false
|
206
|
+
strip_insignificant_zeros: false
|
207
|
+
unit: 円
|
208
|
+
format:
|
209
|
+
delimiter: ","
|
210
|
+
precision: 3
|
211
|
+
separator: "."
|
212
|
+
significant: false
|
213
|
+
strip_insignificant_zeros: false
|
214
|
+
human:
|
215
|
+
decimal_units:
|
216
|
+
format: "%n %u"
|
217
|
+
units:
|
218
|
+
billion: 十億
|
219
|
+
million: 百万
|
220
|
+
quadrillion: 千兆
|
221
|
+
thousand: 千
|
222
|
+
trillion: 兆
|
223
|
+
unit: ''
|
224
|
+
format:
|
225
|
+
delimiter: ''
|
226
|
+
precision: 3
|
227
|
+
significant: true
|
228
|
+
strip_insignificant_zeros: true
|
229
|
+
storage_units:
|
230
|
+
format: "%n%u"
|
231
|
+
units:
|
232
|
+
byte: バイト
|
233
|
+
eb: EB
|
234
|
+
gb: GB
|
235
|
+
kb: KB
|
236
|
+
mb: MB
|
237
|
+
pb: PB
|
238
|
+
tb: TB
|
239
|
+
percentage:
|
240
|
+
format:
|
241
|
+
delimiter: ''
|
242
|
+
format: "%n%"
|
243
|
+
precision:
|
244
|
+
format:
|
245
|
+
delimiter: ''
|
246
|
+
support:
|
247
|
+
array:
|
248
|
+
last_word_connector: "、"
|
249
|
+
two_words_connector: "、"
|
250
|
+
words_connector: "、"
|
251
|
+
time:
|
252
|
+
am: 午前
|
253
|
+
formats:
|
254
|
+
default: "%Y年%m月%d日(%a) %H時%M分%S秒 %z"
|
255
|
+
long: "%Y/%m/%d %H:%M"
|
256
|
+
short: "%m/%d %H:%M"
|
257
|
+
pm: 午後
|
51
258
|
```
|
52
|
-
.form-group
|
53
|
-
= f.label :name
|
54
|
-
= f.text_field :name, class: 'form-control', id: 'task_name'
|
55
|
-
```
|
56
|
-
```
|
57
|
-
.form-group
|
58
|
-
= f.label :description,
|
59
|
-
= f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
|
60
|
-
= f.submit nil, class: 'btn btn-primary'
|
61
|
-
```
|
62
259
|
|
63
260
|
### 試したこと
|
64
261
|
|
65
|
-
|
262
|
+
インデントなど徹底的に意識しましたが、今度は別のエラー?が出ました。
|
66
263
|
|
67
264
|
### 補足情報(FW/ツールのバージョンなど)
|
68
265
|
Rails 6.0.2.2
|
2
やはり同じようなエラーが出ます。参考になるかどうか分かりませんがVisual Studio Codeのスクショを貼り付けます。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
### 前提・実現したいこと
|
1
|
+
### 前提・実現したいこと
|
2
2
|
|
3
3
|
Ruby on Railsでタスク管理アプリケーションを作成している途中でタイトルのエラーが出ました。
|
4
4
|
過去の解決済みの質問を参考にlink_toの前にスペースを入れたりしましたが解決しませんでした。
|
@@ -8,46 +8,35 @@
|
|
8
8
|
|
9
9
|
```
|
10
10
|
ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template: check h1 タスクの新規登録
|
11
|
-
|
12
11
|
.nav.justify-content-end
|
13
|
-
=
|
12
|
+
= link_to '一覧', tasks_path, class: 'nav-link'
|
14
|
-
|
15
|
-
=
|
13
|
+
= form_with model: @task, local: true do |f|
|
16
14
|
.form-group
|
17
|
-
=
|
15
|
+
= f.label :name
|
18
|
-
= f.text_field :name,
|
19
|
-
|
16
|
+
= f.text_field :name, class: 'form-control', id: 'task_name'
|
20
|
-
id: 'task_name'
|
21
17
|
.form-group
|
22
|
-
=
|
18
|
+
= f.label :description,
|
23
|
-
=
|
19
|
+
= f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
|
24
|
-
id: 'task_description',
|
25
|
-
=
|
20
|
+
= f.submit nil, class: 'btn btn-primary'
|
26
|
-
|
27
21
|
):
|
28
22
|
1: h1 タスクの新規登録
|
29
|
-
2:
|
30
|
-
|
23
|
+
2: .nav.justify-content-end
|
31
|
-
|
24
|
+
3: = link_to '一覧', tasks_path, class: 'nav-link'
|
32
|
-
5:
|
33
|
-
|
25
|
+
4: = form_with model: @task, local: true do |f|
|
34
|
-
|
26
|
+
5: .form-group
|
35
|
-
|
27
|
+
6: = f.label :name
|
36
|
-
9: = f.text_field :name,
|
37
|
-
|
28
|
+
7: = f.text_field :name, class: 'form-control', id: 'task_name'
|
38
|
-
11: id: 'task_name'
|
39
|
-
|
29
|
+
8: .form-group
|
40
|
-
|
30
|
+
9: = f.label :description,
|
41
|
-
|
31
|
+
10: = f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
|
42
|
-
15: id: 'task_description',
|
43
|
-
|
32
|
+
11: = f.submit nil, class: 'btn btn-primary'
|
44
33
|
|
45
|
-
app/views/tasks/new.html.slim:
|
34
|
+
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
46
|
-
app/views/tasks/new.html.slim:
|
35
|
+
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
47
|
-
app/views/tasks/new.html.slim:
|
36
|
+
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
48
|
-
app/views/tasks/new.html.slim:
|
37
|
+
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
49
|
-
app/views/tasks/new.html.slim:
|
38
|
+
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
50
|
-
app/views/tasks/new.html.slim:
|
39
|
+
app/views/tasks/new.html.slim:11: syntax error, unexpected '='
|
51
40
|
```
|
52
41
|
|
53
42
|
### 該当のソースコード
|
1
当方勉強し始めたばかりの初心者ですので何もわかっておらず大変申し訳ありません。コードブロックを追加しました。```の入れ方があっているかどうか分かりませんがご助言頂けると助かります。
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
### 発生している問題・エラーメッセージ
|
8
8
|
|
9
|
+
```
|
9
10
|
ActionView::SyntaxErrorInTemplate (Encountered a syntax error while rendering template: check h1 タスクの新規登録
|
10
11
|
|
11
12
|
.nav.justify-content-end
|
@@ -47,25 +48,28 @@
|
|
47
48
|
app/views/tasks/new.html.slim:16: syntax error, unexpected '='
|
48
49
|
app/views/tasks/new.html.slim:16: syntax error, unexpected '='
|
49
50
|
app/views/tasks/new.html.slim:16: syntax error, unexpected '='
|
51
|
+
```
|
50
52
|
|
51
53
|
### 該当のソースコード
|
52
|
-
|
54
|
+
```
|
53
55
|
h1 タスクの新規登録
|
54
|
-
|
56
|
+
```
|
57
|
+
```
|
55
58
|
.nav.justify-content-end
|
56
59
|
= link_to '一覧', tasks_path, class: 'nav-link'
|
57
|
-
|
58
60
|
= form_with model: @task, local: true do |f|
|
61
|
+
```
|
62
|
+
```
|
59
63
|
.form-group
|
60
64
|
= f.label :name
|
61
|
-
= f.text_field :name,
|
62
|
-
|
65
|
+
= f.text_field :name, class: 'form-control', id: 'task_name'
|
63
|
-
|
66
|
+
```
|
67
|
+
```
|
64
68
|
.form-group
|
65
69
|
= f.label :description,
|
66
|
-
= f.text_area :description, rows: 5, class: 'form-control',
|
70
|
+
= f.text_area :description, rows: 5, class: 'form-control', id: 'task_description',
|
67
|
-
id: 'task_description',
|
68
71
|
= f.submit nil, class: 'btn btn-primary'
|
72
|
+
```
|
69
73
|
|
70
74
|
### 試したこと
|
71
75
|
|