-1
で正しくレンダリングされませんindex.html.erbは、私はindex.html.erbが正しくレンダリングされていないと私はapplication.html.erbを使用していたとき、私はそれがファイルを削除すると、すべてが正常に動作プロジェクトを作ったRailsの
Home Controller
class HomeController < ApplicationController
end
Routes file
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root "home#index"
resources :posts
end
application.html.erb
<!DOCTYPE html>
<html>
<head>
<title>Project</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield%>
</body>
</html>
を_ _「index.html.erbが正しくレンダリングされていない」 - あなたは正確に何でないに関するいくつかの詳細を追加することができますワーキング? – mikej
@mikejこれはapplication.html.erb [link](https://www.dropbox.com/s/akdo20maryywjn5/After.jpg?dl=0)を追加した後です。これはapplication.html.erbを追加する前です[link](https://www.dropbox.com/s/qg4y72qr9myt4vq/Before.jpg?dl=0) –
あなたのルートには 'root" home#index "'が含まれていますが、あなたはindexメソッドを定義していませんHomeController、すなわち。 'def index ...'。 – assefamaru