概要
Railsでtask runner
を実行しようとすると以下のエラーが起こり、途中で処理が止まってしまいました。
$ bundle exec rails runner -e development [タスク]
objc[13178]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called.
objc[13178]: +[__NSPlaceholderDictionary 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.
解決法
$ echo 'export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES' >> ~/.bash_profile
$ exec $SHELL -l
$ bin/spring stop
$ bundle exec rails runner -e development [タスク]
参照
macOS High Sierra で "__NSPlaceholderDictionary initialize" エラー