Big Sur Update Leads to Multiple Load Error Rails Ruby

你离开我真会死。 提交于 2021-02-20 02:53:29

问题


After updating to Big Sur, my ruby (2.6.3) on rails (5.2.1) application repeatedly has LoadError when running rails s or rails db:migrate.

I have tried uninstall and reinstall rails multiple time but it will only work 1 or 2 times before encountering LoadError again.

Here are some samples of the errors (Note that they are different)

/Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require': cannot load such file -- new_relic/agent/instrumentation/sinatra/transaction_namer (LoadError)

/Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require': cannot load such file -- /Library/Ruby/Gems/2.6.0/gems/newrelic_rpm-6.8.0.360/lib/new_relic/agent/instrumentation/active_merchant.rb (LoadError)

/Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require': cannot load such file -- /Library/Ruby/Gems/2.6.0/gems/newrelic_rpm-6.8.0.360/lib/new_relic/agent/instrumentation/typhoeus.rb (LoadError)

/Library/Ruby/Gems/2.6.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require': cannot load such file -- ffaker/company (LoadError)

Update: currently trying installing rails via rvm to see if this consistent error goes away.


回答1:


You should not use Apple's Ruby installation. That installation exists solely for internal use by Apple itself.

My guess is that the System Integrity Protection keeps deleting and/or restoring stuff that you changed in the system protected directories.

For more information, see for example

  • macOS 10.15 Catalina Release Notes
  • PSA: Do not use system Ruby
  • Why you shouldn't use the System Ruby
  • If possible, do not use the ruby system version on Mac OSX


来源:https://stackoverflow.com/questions/65084827/big-sur-update-leads-to-multiple-load-error-rails-ruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!