Hi guys, I just got to listing 4.7 on the tutorial. When I run the command rails server -b $IP -p $PORT
and opens the correspoding sample_app on the web browser, I received the following error message on C9’s console:
Started GET “/” for 139.192.9.237 at 2015-01-12 13:47:46 +0000
Processing by StaticPagesController#home as HTML
Rendered static_pages/home.html.erb within layouts/application (3.5ms)
Completed 500 Internal Server Error in 53ms
EOFError (end of file reached):
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_html_erb___1968168670209067927_48192600’
And the browser displays the following error in screenshot:
Reading the from the error message, I tried to find any typo in~/workspace/sample_app/app/assets/views/layout/application.html.erb
but to no success. Here’s what I have in that file:
<%= full_title(yield(:title)) %>
<%= stylesheet_link_tag ‘application’, media: ‘all’, ‘data-turbolinks-track’ => true %>
<%= javascript_include_tag ‘application’, ‘data-turbolinks-track’ => true %>
<%= csrf_meta_tags %>
<%= yield %>
I also tried to find any typo in the following 2 files respectively based on the error message: ~/workspace/sample_app/app/controllers/static_pages_controller.rb
class StaticPagesController < ApplicationController
def home
end
def help
end
def about
end
end
and ~/workspace/sample_app/app/views/static_pages/home.html.erb
Sample App
This is the homepage for the Ruby on Rails Tutorial Sample Application
Can anyone give me a pointer where the “bug” is? Thanks in advance.