Skip to content

Instantly share code, notes, and snippets.

@waterlink
Created July 15, 2013 13:33
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 waterlink/5999962 to your computer and use it in GitHub Desktop.
Save waterlink/5999962 to your computer and use it in GitHub Desktop.
# Tip 1
# Problem: Models are not loaded in migrations when config.threadsafe! is set
# Why: The threadsafe option in production doesn't load the dependencies
# Solution: Configure it to load dependencies with this option in your production.rb just after config.threadsafe!
# config/environments/production.rb
config.threadsafe!
config.dependency_loading = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment