projects/index
, application/index
に該当するビューを app/views
から探したけれどいずれも見つからなかったといっていますね
app/views/projects
にindex.html.erb
を配置してあげると、erb に保存した内容が表示されるはずです
あるいはアクセスされたアドレスを元にアクションを振り分ける、config/routes.rb
の記述を確認してみる必要があるかもしれません
フレームワークを利用する際、ディレクトリやファイルの数に驚かれるかもしれません
tree
コマンドで簡単にディレクトリ構造を調べることができます
rails new
, rails generate controller projects index
を実行したあとのディレクトリ構造:
(tree -L 3
)
lang
1.
2├── Gemfile
3├── Gemfile.lock
4├── README.md
5├── Rakefile
6├── app
7│ ├── assets
8│ │ ├── images
9│ │ ├── javascripts
10│ │ └── stylesheets
11│ ├── controllers
12│ │ ├── application_controller.rb
13│ │ ├── concerns
14│ │ └── projects_controller.rb
15│ ├── helpers
16│ │ ├── application_helper.rb
17│ │ └── projects_helper.rb
18│ ├── mailers
19│ ├── models
20│ │ └── concerns
21│ └── views
22│ ├── layouts
23│ └── projects
24...
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/01/11 02:21