Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
alicia glenn
3,706 PointsLoadError in StatusesController#index
I am getting the following error, help please:
Unable to autoload constant ApplicationController, expected /Users/aliciatglenn/code/treehouse/app/controllers/application_controller.rb to define it
Extracted source (around line #1):
class StatusesController < ApplicationController
before_action :set_status, only: [:show, :edit, :update, :destroy]
# GET /statuses
# GET /statuses.json
def index
6 Answers

Alan Johnson
7,625 PointsDoes a file exist at app/controllers/application_controller.rb
for you?
alicia glenn
3,706 PointsYes
alicia glenn
3,706 Points
Alan Johnson
7,625 PointsSorry I've been MIA the past day - my family's in town visiting so I'm taking off, but I'll try to pull your code down and help out as soon as I can!
alicia glenn
3,706 Pointsok no problem, thanks :).

Alan Johnson
7,625 PointsWhat are you doing to get that error to happen? I just loaded up your repo and it's working fine for me right now.
alicia glenn
3,706 PointsI am going to localhost:300/statuses

Alan Johnson
7,625 PointsI just loaded up your app, and it's working fine for me when I go to /statuses
. Really weird.
Have you tried stopping and starting your Rails server just to make sure nothing odd is happening there?
alicia glenn
3,706 Pointsyes, just by clicking control c right? Could it be a rails 4 error? are the lessons updated?

Alan Johnson
7,625 PointsCtrl-C is right! Just hit Ctrl-C and then start it back up again with rails s
.
They're not updated to Rails 4 yet, but I ran your app earlier today and it worked fine, and I was using your Gemfile so was using whatever version or Rails you're on.
alicia glenn
3,706 Pointsyea I've restarted my server several times, no luck.
alicia glenn
3,706 PointsThis is the error i see at the top: RuntimeError in StatusesController#index Circular dependency detected while autoloading constant ApplicationController
Dave Faliskie
17,793 PointsDid you ever solve this problem? I am having the same sort of issue.