Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save israelb/5ab541f0da50159c95e5b2a4f1eca7d8 to your computer and use it in GitHub Desktop.
Save israelb/5ab541f0da50159c95e5b2a4f1eca7d8 to your computer and use it in GitHub Desktop.
Solve issue with objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
# If you have issue with
# objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
# objc[18501]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
# I had this problem when running `bin/rails c` on Mac M1 Pro. The solution for this is below
$ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
$ export DISABLE_SPRING=true
This should help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment