[BUG] cross-thread violation on rb_gc() が出て困った話し

rails generate scaffold しようとしたら、タイトルのエラー出た。

$ rails generate scaffold Product title:string description:text image_url:string price:decimal
[BUG] cross-thread violation on rb_gc()
(null)

jsonをアンインストールして、

sudo gem uninstall json 

再インストール後、

sudo gem install json_pure

bundle installしたら治った。

bundle install

エラーメッセージ少ないと、情報探すの辛いですね…

ruby on rails - Error: cross-thread violation on rb_gc() - Stack Overflow

[BUG] cross-thread violation on rb_gc() | Carol’s 10 Cents