EOFError (end of file reached): StaticPagesController#home

Hi guys, I just got to listing 4.7 on the tutorial. When I run the
rails server -b $IP -p $PORT and opens the correspoding sample_app on
web browser, I received the following error message on C9’s console:

Started GET "/" for at 2015-01-12 13:47:46 +0000
Processing by StaticPagesController#home as HTML
 Rendered static_pages/home.html.erb within layouts/application 

Completed 500 Internal Server Error in 53ms

EOFError (end of file reached):


And the browser displays the following error in screenshot:


Reading the from the error message, I tried to find any typo in
to no success. Here’s what I have in that file:

<!DOCTYPE html>
    <title><%= full_title(yield(:title)) %></title>
    <%= stylesheet_link_tag 'application', media: 'all',

‘data-turbolinks-track’ => true %>
<%= javascript_include_tag ‘application’,
=> true %>
<%= csrf_meta_tags %>

<%= yield %>

I also tried to find any typo in the following 2 files respectively
on the error message:

class StaticPagesController < ApplicationController
  def home

  def help

  def about


and ~/workspace/sample_app/app/views/static_pages/home.html.erb

<h1>Sample App</h1>
<p>This is the homepage for the <a href="http://railstutorial.org">

Ruby on Rails Tutorial Sample Application

Can anyone give me a pointer where the “bug” is? Thanks in advance.

Cleaning up the temp files using the following command fixes this issue:
rake tmp:clear

1 Like

This worked for me. Had similar problem.
When I was trying to create an evp key, succeeded the first time but subsequents were giving EOFerror.
Any idea why this solution works?