briandunn / flatware

A parallel test runner for RSpec and Cucumber with pretty output
MIT License
275 stars 35 forks source link

The problem is in a Rails 7.0 project with Ruby 3.3 #78

Closed afuno closed 7 months ago

afuno commented 7 months ago

I added your library to a Rails 7.0 project that works with Ruby 3.3:

gem "flatware-rspec", github: "briandunn/flatware", branch: "master", require: false

As a result, when I run this command:

bundle exec flatware rspec -r ./spec/flatware_helper

I get this:

/Users/afuno/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/pg-1.5.4/lib/pg/connection.rb:690: [BUG] Segmentation fault at 0x00000001288d0ace
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]

-- Crash Report log information --------------------------------------------
   See Crash Report log file in one of the following locations:             
     * ~/Library/Logs/DiagnosticReports                                     
     * /Library/Logs/DiagnosticReports                                      
   for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     

Please tell me what could be the problem?

briandunn commented 7 months ago

what is the contents of ./spec/flatware_helper? What happens when you leave the -r argument off, and put the TEST_ENV_NUMBER in the test database name in your database.yml instead?

briandunn commented 7 months ago

Just came across this today. adding ENV['PGGSSENCMODE'] = "disable" to the top of flatware_helper.rb fixed it for me.

briandunn commented 7 months ago

Added instructions for avoiding pg segfaults to the readme.