刚刚安装了新的导轨安装。按照this tutorial中的步骤操作。在14:04,索引页面应该出现。
运行索引页时出现此错误:
ExecJS::ProgramError in Posts#index
Showing C:/Sites/Simpleblog/app/views/layouts/application.html.erb where line #7 raised:
TypeError: Object doesn't support this property or method
Extracted source (around line #7):
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
Rails.root: C:/Sites/Simpleblog
第7行是:
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
这是routes.rb:
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root 'posts#index'
end
这是posts_controller:
class PostsController < ApplicationController
def index
end
end