Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
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,781 PointsDid you ever solve this problem? I am having the same sort of issue.