ActionView::MissingTemplate after Rails 3.1 upgrade

Posted by jonallard on Stack Overflow See other posts from Stack Overflow or by jonallard
Published on 2011-09-04T12:05:04Z Indexed on 2012/03/28 17:29 UTC
Read the original article Hit count: 306

After upgrading to Rails 3.1.0 and following David Rice's instructions, all of my controllers strangely can't find their views anymore.

# rails s #

Started GET "/units" for 127.0.0.1 at 2011-09-04 07:52:23 -0400
  Unit Load (0.1ms)  SELECT "units".* FROM "units" 

ActionView::MissingTemplate (Missing template units/index, application/index with {:handlers=>[:erb, :builder], :formats=>[:html], :locale=>[:en, :en]}. Searched in:
):
  app/controllers/units_controller.rb:9:in `index'

units_controller.rb:

  # GET /units
  # GET /units.xml
  def index
    @units = Unit.all

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @units }
    end
  end

Of course, the view is there (/app/views/units/index.html.erb; it was working before the upgrade). I feel this is a stupid error, what am I missing here?

© Stack Overflow or respective owner

Related posts about ruby-on-rails-3.1

Related posts about actionview