All of a sudden, after doing a git pull into my discourse dev env on mac, getting this error after a successful bundle install when I try any rake or rails command.
gems/activesupport-6.0.3.2/lib/active_support/dependencies.rb:324:in `require': cannot load such file -- omniauth/strategies/oauth2 (LoadError)
Have tried removing all gems, starting over, reinstalling from scratch, nothing works; keep getting the same error.
Sorry to hear you are having issues with dev on macOS. It’s definitely tricky.
Just for you, I logged into one of my mac minis which has never had rails (or discourse) installed; it was a total virgin macos which I use for a file server only.
I followed the macOS dev install from scratch; and had the usual problems with directory permissions and the seemingly always pesky cppjieba_rb gem; but it did install and finally:
This mac is far from virgin, and after reading your reply, tirelessly tried reinstalling from “scratch” with Ruby 2.7,1, 2.6.1 and 2.6.5, with different errors related to bootsnap each time.
Simple Rails apps generated new work fine; and Discourse bundle works fine; but when I start Rails I keep getting bootsnap errors.
Was going to wipe out Ruby and Rails completely and start over with a clean slate but have other Rails projects on going and so will put learning and hacking Discourse plugins on the sidelines for now.
Thanks again @neounix for taking the time to help and showing me it works on a virgin machine.
Thank you for that image of your versions @neounix
Since the macos dev install script did not upgrade or install properly for some reason (guessing because the install was older and not virgin, but not sure, but ran it many times, left and right); I just manually upgraded both Ruby using rvm (this guide):
and then updated the Rails gem manually to version 6.0.3.2; and ran bundle again in the ./discourse directory: