Stan Blog

學習過程中的一些記錄

[Rails] 使用 rails console 發生 __NSCFConstantString initialize

環境:

  MacOS: 12.6.2
  Ruby version: 3.0.3
  Rails version: 6.1.7.3

前陣子將一個 Rails 專案從 6.1.6.1 升到 6.1.7.3

升級後,用 rails console 查東西會噴這個錯誤

[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called

06-16-1

爬文後,有兩個解法

1.在 ~/.zshrc 裡面加上 export DISABLE_SPRING=true

06-16-2 06-16-3

2.把 gem ‘spring’ 移除

Ref:

Comments

comments powered by Disqus