8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac環境でRails内で別プロセスが立ち上がる処理をすると落ちてしまうとき

Last updated at Posted at 2019-11-27

概要

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" エラー

8
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?