Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgringwe/cac9809cf289ba539612 to your computer and use it in GitHub Desktop.
Save sgringwe/cac9809cf289ba539612 to your computer and use it in GitHub Desktop.
Fix for circular dependency detected while autoloading constant in Rspec
# I was getting this error randomly in my specs:
# Circular dependency detected while autoloading constant UsersController
# the fix for me was changing the following mistake:
school = FactoryGirl.create(:school)
# to be
let(:school) { FactoryGirl.create(:school) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment