I have started getting the following error when I try to run 'rails s' on my local machine:
You've tried to invoke Spring when it's already loaded (i.e. the Spring constant is defined).
This is probably because you generated binstubs with Spring 1.0, and you now have a Spring version > 1.0 on your system. To solve this, upgrade your bundle to the latest Spring version and then run `bundle exec spring binstub --all` to regenerate your binstubs. This is a one-time step necessary to upgrade from 1.0 to 1.1.
Here's the backtrace:
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:319:in `block in load'
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/activesupport-6.0.2.2/lib/active_support/dependencies.rb:319:in `load'
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<main>'
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Users/emmetgibney/.rbenv/versions/2.7.0/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Users/emmetgibney/Dropbox/Programming/tableread/tableread/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
I have Spring version 2.1.0 installed on my machine. I have run the command the error message asks, bundle exec spring binstub --all and the error persists. I read on another SO answer to try running bundle exec spring binstub --remove --all which did remove then binstubs, I then ran the first command again to regenerate them. Still getting the same error.
The problem persists even on other rails apps. For example, when I switch to another app on my machine and run rails s I get the same error, even though I might not have worked on that app for weeks.
The problem started after installing Docsplit and its required dependencies, along with google-cloud-text_to_speech. Probably worth noting that my system won't allow me to uninstall the google-cloud-text_to_speech gem as well.
I'm using MacOS 10.13.6