Skip to content

Instantly share code, notes, and snippets.

@zanetagebka
Last active May 17, 2023 15:16
Show Gist options
  • Save zanetagebka/3b9b42c92ce5926fd5aada6b3a9535a5 to your computer and use it in GitHub Desktop.
Save zanetagebka/3b9b42c92ce5926fd5aada6b3a9535a5 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.
@zanetagebka
Copy link
Author

See more here: rails/rails#38560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment