RSpec hanging when running in RubyMine, works fine outside of RubyMine and on old laptop
I recently upgraded my laptop, from a 2019 MacBook Pro to a 2023 MacBook Pro (M2). Spring and Rspec were working fine on the old laptop.
See this output in RubyMine's run tab:
/bin/zsh -c "bash -c '. /Users/jamesmcguire/.asdf/asdf.sh && asdf shell ruby 2.7.8 && ruby /Users/jamesmcguire/repos/xxxx/bin/spring rspec /Users/jamesmcguire/repos/xxxx/xxxx.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format '\"'\"'Spec::Runner::Formatter::TeamcityFormatter'\"'\"' --example '\"'\"'XXXX::xxxx'\"'\"''"
Testing started at 3:55 PM ...
But it just hangs.
If I disable spring system wide, it will work.
If I run this command in the console, everything works:
ruby /Users/jamesmcguire/repos/xxxx/bin/spring rspec /Users/jamesmcguire/repos/xxxx/xxxx.rb
Will also get output indicating spring is being used before the test results show up:
Running via Spring preloader in process 41619
Please sign in to leave a comment.
Hello James,
Could you please specify how it goes if you stop Spring server and then run the tests with it again?
Olga Kuvardina, how do I stop the spring server? If I disable spring (ie, use Find Action... and disable Spring pre-loader), I am able to run the tests successfully.
Please try stopping the Spring server the way it's described here