質問編集履歴

1

解決策として提唱されているフォルダ名の変更を試しましたが、エラーは依然として健在。

2018/07/09 03:06

投稿

igar
igar

スコア110

test CHANGED
File without changes
test CHANGED
@@ -67,3 +67,213 @@
67
67
  app/controllers/clickcount_controller.rb:1:in `<top (required)>'
68
68
 
69
69
  ```
70
+
71
+
72
+
73
+ ## 追記
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ 解決策を探しまして、
82
+
83
+
84
+
85
+ - [Rails: AbstractController::Helpers::MissingHelperError - Missing helper file application\_helper.rb\_helper.rb - Stack Overflow](https://stackoverflow.com/questions/27884908/rails-abstractcontrollerhelpersmissinghelpererror-missing-helper-file-app)
86
+
87
+ - [RSpecを実行するとMissing helper fileと表示される - Qiita](https://qiita.com/kiyodori/items/f41408f3da626fbb0bbe)
88
+
89
+ - [schema - Strange error in rails - missing helper - Stack Overflow](https://stackoverflow.com/questions/27871726/strange-error-in-rails-missing-helper)
90
+
91
+ - [Rails アプリを動かそうとしたら「Missing helper file」というエラーが発生する件 - Corredor](http://neos21.hatenablog.com/entry/2017/03/23/010854)
92
+
93
+
94
+
95
+ いろいろ調べた結果、
96
+
97
+
98
+
99
+ 結局、
100
+
101
+
102
+
103
+ > 解消法としては、Rails アプリのディレクトリ名を一旦違う名前に変更し、元の名前に戻してやると、なぜか解消する。
104
+
105
+
106
+
107
+ らしいのですが、
108
+
109
+
110
+
111
+ なんとかリネームして再検証しましたが、
112
+
113
+ ```
114
+
115
+ PS C:\pg\rails> Rename-Item tool tooltmp
116
+
117
+ PS C:\pg\rails> Rename-Item .\tooltmp\ tool
118
+
119
+ ```
120
+
121
+
122
+
123
+ 同じくエラーでした。
124
+
125
+
126
+
127
+ > 単なるリネームで解消しない場合は、例えば「xxx」にディレクトリ名を変更したら、新たに「RailsPractice」ディレクトリを作り、中身をソックリそちらに移動させたりする。結局は同じディレクトリ名で、ファイルや設定は何も変更していないのだが、これで解消する。
128
+
129
+
130
+
131
+ ```
132
+
133
+ PS C:\pg\rails> Rename-Item tool tooltmp
134
+
135
+ PS C:\pg\rails> mkdir tool
136
+
137
+
138
+
139
+
140
+
141
+ ディレクトリ: C:\pg\rails
142
+
143
+
144
+
145
+
146
+
147
+ Mode LastWriteTime Length Name
148
+
149
+ ---- ------------- ------ ----
150
+
151
+ d----- 2018/07/09 11:56 tool
152
+
153
+
154
+
155
+
156
+
157
+ PS C:\pg\rails> mv .\tooltmp* tool/
158
+
159
+ PS C:\pg\rails> ls tool
160
+
161
+
162
+
163
+
164
+
165
+ ディレクトリ: C:\pg\rails\tool
166
+
167
+
168
+
169
+
170
+
171
+ Mode LastWriteTime Length Name
172
+
173
+ ---- ------------- ------ ----
174
+
175
+ d----- 2018/07/07 17:04 app
176
+
177
+ d----- 2018/07/07 17:04 bin
178
+
179
+ d----- 2018/07/07 17:04 config
180
+
181
+ d----- 2018/07/07 17:07 db
182
+
183
+ d----- 2018/07/07 17:04 lib
184
+
185
+ d----- 2018/07/07 17:06 log
186
+
187
+ d----- 2018/07/07 17:04 public
188
+
189
+ d----- 2018/07/07 17:04 storage
190
+
191
+ d----- 2018/07/07 17:04 test
192
+
193
+ d----- 2018/07/07 17:07 tmp
194
+
195
+ d----- 2018/07/07 17:04 vendor
196
+
197
+ -a---- 2018/07/07 17:04 679 .gitignore
198
+
199
+ -a---- 2018/07/07 17:04 5 .ruby-version
200
+
201
+ -a---- 2018/07/07 17:04 130 config.ru
202
+
203
+ -a---- 2018/07/07 17:04 1957 Gemfile
204
+
205
+ -a---- 2018/07/07 17:04 5086 Gemfile.lock
206
+
207
+ -a---- 2018/07/07 17:04 62 package.json
208
+
209
+ -a---- 2018/07/07 17:04 227 Rakefile
210
+
211
+ -a---- 2018/07/07 17:04 374 README.md
212
+
213
+
214
+
215
+
216
+
217
+ PS C:\pg\rails> ls .\tooltmp\
218
+
219
+ PS C:\pg\rails>
220
+
221
+ ```
222
+
223
+
224
+
225
+ 説明通りにやったのですが、
226
+
227
+
228
+
229
+ ```
230
+
231
+ PS C:\pg\rails\tool> cd ..
232
+
233
+ PS C:\pg\rails> cd tool
234
+
235
+ PS C:\pg\rails\tool> rails s
236
+
237
+ => Booting Puma
238
+
239
+ => Rails 5.2.0 application starting in development
240
+
241
+ => Run `rails server -h` for more startup options
242
+
243
+ *** SIGUSR2 not implemented, signal based restart unavailable!
244
+
245
+ *** SIGUSR1 not implemented, signal based restart unavailable!
246
+
247
+ *** SIGHUP not implemented, signal based logs reopening unavailable!
248
+
249
+ Puma starting in single mode...
250
+
251
+ * Version 3.11.4 (ruby 2.4.2-p198), codename: Love Song
252
+
253
+ * Min threads: 5, max threads: 5
254
+
255
+ * Environment: development
256
+
257
+ * Listening on tcp://0.0.0.0:3000
258
+
259
+ Use Ctrl-C to stop
260
+
261
+ Started GET "/" for 127.0.0.1 at 2018-07-09 11:58:11 +0900
262
+
263
+
264
+
265
+ AbstractController::Helpers::MissingHelperError (Missing helper file helpers/c:/pg/rails/tool/app/helpers/application_helper.rb_helper.rb):
266
+
267
+ ```
268
+
269
+
270
+
271
+ やはり同様のエラー。
272
+
273
+
274
+
275
+ 万策尽きた感……
276
+
277
+
278
+
279
+ どうしたら良いでしょうか…。