0
0

More than 3 years have passed since last update.

<Ruby> No template for interactive requestの対処法

Posted at

RubyでCRUD処理の勉強していたら、
No template for interactive request
というエラーが出ました。

解決方法は、

UsersControllerに対するviewディレクトリの中のusersディレクトリのnew.html.erbを作る。

UsersController#new is missing a template for request formats: text/html
とあり、UsersControllerに対するviewディレクトリの中のusersディレクトリのnew.html.erbに問題がありました。

私の場合は、
viewディレクトリの中の
最初からあるlayoutsディレクトリの中に
usersディレクトリが入っていました。

これをviewディレクトリの中に移動するだけでエラーが出なくなりました。

ディレクトリの場所をちゃんと確認することが大切だとわかりました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0