Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ruby 3.0 support #1427

Merged
merged 14 commits into from Apr 10, 2021
Merged

Add Ruby 3.0 support #1427

merged 14 commits into from Apr 10, 2021

Conversation

VSPPedro
Copy link
Collaborator

@VSPPedro VSPPedro commented Mar 7, 2021

The purpose of this PR is to enable the use of shoulda-matchers with Ruby 3.0.0.

@VSPPedro
Copy link
Collaborator Author

VSPPedro commented Mar 21, 2021

The problem now is a Segmentation fault happening at this line:

https://github.com/rails/rails/blob/03950ac91c642d8b19e19a42b6bebe3f71805054/actionpack/lib/action_dispatch/routing/route_set.rb#L317-L327

If you want to see the error locally it's necessary to ran the tests like this with Ruby 3.0.0:

bundle exec appraisal rails_6_0 rspec spec/unit

If you try to run this command 3 time, you will see that the error happens in different tests for ActionController - or even in diferent files. A test can fail in the first try, but pass at the second. I'm not sure the reason yet. To be honest, I never dealt with this kind of error before.

In case you would like to see more about the error message:

/home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:319: [BUG] Segmentation fault at 0x0000000000000010
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0095 p:---- s:0541 e:000540 CFUNC  :define_method
c:0094 p:0028 s:0536 E:000f18 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:319
c:0093 p:0128 s:0525 e:000524 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:115
c:0092 p:0113 s:0516 e:000515 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:588
c:0091 p:0222 s:0509 e:000508 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/mapper.rb:1956
c:0090 p:0064 s:0491 e:000490 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/mapper.rb:1927
c:0089 p:0066 s:0477 e:000476 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/mapper.rb:1891 [FINISH]
c:0088 p:---- s:0472 e:000471 CFUNC  :each
c:0087 p:0290 s:0468 e:000467 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/mapper.rb:1885
c:0086 p:0210 s:0454 e:000453 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/mapper.rb:1633
c:0085 p:0031 s:0444 e:000443 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/mapper.rb:751
c:0084 p:0011 s:0436 e:000435 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/mapper.rb:712
c:0083 p:0006 s:0430 e:000429 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/railties-6.0.3.5/lib/rails/application/finisher.rb:77 [FINISH]
c:0082 p:---- s:0427 e:000426 CFUNC  :instance_exec
c:0081 p:0037 s:0423 e:000422 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:428
c:0080 p:0006 s:0417 e:000416 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:445 [FINISH]
c:0079 p:---- s:0413 e:000412 CFUNC  :each
c:0078 p:0035 s:0409 e:000408 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/actionpack-6.0.3.5/lib/action_dispatch/routing/route_set.rb:445
c:0077 p:0012 s:0405 e:000404 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/railties-6.0.3.5/lib/rails/application/routes_reloader.rb:35 [FINISH]
c:0076 p:---- s:0401 e:000400 CFUNC  :each
c:0075 p:0006 s:0397 e:000396 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/railties-6.0.3.5/lib/rails/application/routes_reloader.rb:33
c:0074 p:0003 s:0393 e:000392 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/railties-6.0.3.5/lib/rails/application/routes_reloader.rb:19
c:0073 p:0005 s:0389 e:000388 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/railties-6.0.3.5/lib/rails/application.rb:169
c:0072 p:0013 s:0385 e:000384 METHOD /home/pedro/tempo-livre/collaborator/shoulda-matchers/spec/support/unit/helpers/controller_builder.rb:60
c:0071 p:0008 s:0381 e:000380 BLOCK  /home/pedro/tempo-livre/collaborator/shoulda-matchers/spec/support/unit/helpers/controller_builder.rb:8 [FINISH]
c:0070 p:---- s:0378 e:000377 CFUNC  :instance_exec
c:0069 p:0013 s:0373 e:000372 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455
c:0068 p:0010 s:0367 e:000366 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:372
c:0067 p:0007 s:0361 e:000360 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:529 [FINISH]
c:0066 p:---- s:0357 e:000356 CFUNC  :each
c:0065 p:0012 s:0353 e:000352 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:528
c:0064 p:0013 s:0346 e:000345 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:615 [FINISH]
c:0063 p:---- s:0342 e:000341 CFUNC  :each
c:0062 p:0008 s:0338 e:000337 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:614
c:0061 p:0100 s:0331 e:000330 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:485
c:0060 p:0043 s:0324 e:000323 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:515
c:0059 p:0064 s:0320 e:000318 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:281
c:0058 p:0003 s:0314 e:000313 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:508
c:0057 p:0003 s:0311 e:000310 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:465
c:0056 p:0003 s:0308 e:000307 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:486
c:0055 p:0003 s:0305 e:000304 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:626
c:0054 p:0018 s:0302 e:000301 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:350
c:0053 p:0009 s:0296 e:000295 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-rails-4.0.2/lib/rspec/rails/adapters.rb:75 [FINISH]
c:0052 p:---- s:0292 e:000291 CFUNC  :instance_exec
c:0051 p:0013 s:0287 e:000286 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:455
c:0050 p:0010 s:0281 e:000280 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:390
c:0049 p:0010 s:0275 e:000274 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:628
c:0048 p:0018 s:0272 e:000271 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:350
c:0047 p:0058 s:0266 E:000b28 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:629
c:0046 p:0108 s:0259 E:001fd8 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/hooks.rb:486
c:0045 p:0011 s:0252 E:000b98 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:465
c:0044 p:0019 s:0247 E:001948 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:508
c:0043 p:0111 s:0242 E:002358 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example.rb:259
c:0042 p:0044 s:0235 e:000234 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:644 [FINISH]
c:0041 p:---- s:0229 e:000228 CFUNC  :map
c:0040 p:0011 s:0225 e:000224 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:640
c:0039 p:0067 s:0220 e:000219 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:606
c:0038 p:0007 s:0211 e:000210 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:607 [FINISH]
c:0037 p:---- s:0207 e:000206 CFUNC  :map
c:0036 p:0080 s:0203 e:000202 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:607
c:0035 p:0007 s:0194 e:000193 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:607 [FINISH]
c:0034 p:---- s:0190 e:000189 CFUNC  :map
c:0033 p:0080 s:0186 e:000185 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:607
c:0032 p:0007 s:0177 e:000176 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:607 [FINISH]
c:0031 p:---- s:0173 e:000172 CFUNC  :map
c:0030 p:0080 s:0169 e:000168 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/example_group.rb:607
c:0029 p:0008 s:0160 e:000159 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121 [FINISH]
c:0028 p:---- s:0156 e:000155 CFUNC  :map
c:0027 p:0030 s:0152 e:000151 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:121
c:0026 p:0019 s:0149 e:000148 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:2067
c:0025 p:0007 s:0145 e:000144 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:116
c:0024 p:0009 s:0141 e:000140 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:74
c:0023 p:0019 s:0136 e:000135 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:115
c:0022 p:0042 s:0129 e:000128 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:89
c:0021 p:0065 s:0123 e:000122 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71
c:0020 p:0020 s:0115 e:000114 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45
c:0019 p:0025 s:0110 e:000109 TOP    /home/pedro/.rvm/gems/ruby-3.0.0/gems/rspec-core-3.10.1/exe/rspec:4 [FINISH]
c:0018 p:---- s:0107 e:000106 CFUNC  :load
c:0017 p:0112 s:0102 e:000101 TOP    /home/pedro/.rvm/gems/ruby-3.0.0/bin/rspec:23 [FINISH]
c:0016 p:---- s:0097 e:000096 CFUNC  :load
c:0015 p:0133 s:0092 e:000091 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:74
c:0014 p:0071 s:0083 e:000082 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/cli/exec.rb:28
c:0013 p:0024 s:0078 e:000077 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/cli.rb:463
c:0012 p:0054 s:0073 e:000072 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/command.rb:27
c:0011 p:0040 s:0065 e:000064 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126
c:0010 p:0239 s:0058 e:000057 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor.rb:387
c:0009 p:0008 s:0045 e:000044 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/cli.rb:27
c:0008 p:0066 s:0040 e:000039 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/vendor/thor/lib/thor/base.rb:466
c:0007 p:0008 s:0033 e:000032 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/cli.rb:18
c:0006 p:0086 s:0027 e:000026 BLOCK  /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/exe/bundle:30
c:0005 p:0002 s:0021 e:000020 METHOD /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/lib/bundler/friendly_errors.rb:124
c:0004 p:0047 s:0016 E:0015e0 TOP    /home/pedro/.rvm/gems/ruby-3.0.0/gems/bundler-1.17.3/exe/bundle:22 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC  :load
c:0002 p:0112 s:0008 E:0010b0 EVAL   /home/pedro/.rvm/gems/ruby-3.0.0/bin/bundle:23 [FINISH]
c:0001 p:0000 s:0003 E:000d30 (none) [FINISH]

@VSPPedro
Copy link
Collaborator Author

More information about the problem: https://bugs.ruby-lang.org/issues/17536

It seems there is a fix for that, ruby/ruby#4077, the problem is that it does not have a release for now.

@VSPPedro VSPPedro force-pushed the add-ruby-3.0-support branch 3 times, most recently from 3720ae0 to 83bca79 Compare March 21, 2021 22:13
@mcmire
Copy link
Collaborator

mcmire commented Mar 22, 2021

@VSPPedro This might be one of the only times I've seen a legitimate bug in Ruby 😆

Should we use ruby-head for now, then? I don't like the idea of always doing that, we will need to revert that at some point, but it may be a way to use Ruby 3.0 and get around this issue.

@VSPPedro
Copy link
Collaborator Author

This might be one of the only times I've seen a legitimate bug in Ruby

Me too. 😄

Should we use ruby-head for now, then?

I think it's worth a try. I may need to update some dependencies. We will see.

I don't like the idea of always doing that, we will need to revert that at some point.

I agree with you.

@VSPPedro
Copy link
Collaborator Author

I think we can't do that at the moment. This is the error when trying to use ruby-head:

 Fetching gem metadata from https://rubygems.org/.........
nokogiri-1.11.2-x86_64-linux requires ruby version < 3.1.dev, >= 2.5, which is
incompatible with the current version, ruby 3.1.0p-1

I updated the nokogiri gem to the most recent version. It seems to me that we will need to wait for the release of ruby 3.0.1.

@VSPPedro VSPPedro mentioned this pull request Mar 29, 2021
@VSPPedro
Copy link
Collaborator Author

VSPPedro commented Apr 8, 2021

@VSPPedro VSPPedro force-pushed the add-ruby-3.0-support branch 2 times, most recently from f26fa82 to db94462 Compare April 8, 2021 20:38
@mcmire
Copy link
Collaborator

mcmire commented Apr 8, 2021

@VSPPedro Ok no worries! Thanks for following up.

@VSPPedro VSPPedro marked this pull request as ready for review April 8, 2021 22:20
@VSPPedro VSPPedro requested a review from mcmire April 8, 2021 22:21
@VSPPedro
Copy link
Collaborator Author

VSPPedro commented Apr 8, 2021

Some acceptance tests were failing with this error:

LoadError:
         cannot load such file -- rexml/document

To fix that was necessary to add the gem rexml.

After some research, it seems that Ruby 3 no longer includes the rexml gem by default.

What do you think, @mcmire?

@mcmire
Copy link
Collaborator

mcmire commented Apr 8, 2021

@VSPPedro Hmm interesting. The only issue I have with adding rexml to our test setup is that I feel like our test setup should be very close to a fresh Rails app, and this change would bring it out of sync with that. And consequently the reason why we are adding rexml would get lost down the road. I see the failure in the Actions tab, but it's unclear what is trying to use this gem based on the backtrace. Is there a way you can reproduce that failure locally? I am just wondering whether this might already be fixed in whatever gem is trying to require rexml.

@mcmire
Copy link
Collaborator

mcmire commented Apr 8, 2021

@VSPPedro Okay, so this is a pretty widely reported issue, and I see one such issue exists in Rails: rails/rails#41502. It seems to be coming from selenium-webdriver, and it will be fixed, but that fix is not yet available in a public version yet: SeleniumHQ/selenium#9002 (scroll to bottom). So it seems like there are two solutions to this: either add rexml or remove selenium-webdriver. I know I just made an argument for trying to mimic a fresh Rails app as much as possible, but perhaps removing selenium-webdriver is better here, considering that none of our integration tests rely on running system tests within our test Rails app?

@VSPPedro
Copy link
Collaborator Author

VSPPedro commented Apr 9, 2021

I see. I'll try to remove it.

One example of a test that is failing:

it 'allows the use of matchers from both libraries' do
result = run_rspec_suite
expect(result).to have_output('2 examples, 0 failures')
expect(result).to have_output(
'is expected to validate that :name cannot be empty/falsy',
)
expect(result).to have_output(
'is expected to validate that :name is case-sensitively unique',
)
end

Error:

Failure/Error: expect(result).to have_output('2 examples, 0 failures')
     
       Expected command to have output, but did not.
     
       Command: SPEC_OPTS="-fd" BUNDLE_GEMFILE="/tmp/shoulda-matchers-acceptance/test-project/Gemfile" bundle _1.17.3_ exec rake spec --trace
     
       Expected output:
       "2 examples, 0 failures"
     
       Actual output:
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       ** Invoke spec (first_time)
       ** Invoke spec:prepare (first_time)
       ** Execute spec:prepare
       ** Invoke test:prepare (first_time)
       ** Execute test:prepare
       ** Execute spec
       /home/pedro/.rvm/rubies/ruby-3.0.1/bin/ruby -I/home/pedro/.rvm/gems/ruby-3.0.1/gems/rspec-core-3.10.1/lib:/home/pedro/.rvm/gems/ruby-3.0.1/gems/rspec-support-3.10.2/lib /home/pedro/.rvm/gems/ruby-3.0.1/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:29: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:35: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:44: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
       /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
     
       An error occurred while loading ./spec/models/user_spec.rb. - Did you mean?
                           rspec ./spec/spec_helper.rb
     
       Failure/Error: require File.expand_path('../config/environment', __dir__)
     
       LoadError:
         cannot load such file -- rexml/document
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `block in require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in `load_dependency'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/firefox.rb:22:in `<main>'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `block in require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in `load_dependency'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/webdrivers-4.6.0/lib/webdrivers/geckodriver.rb:72:in `<main>'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `block in require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in `load_dependency'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/webdrivers-4.6.0/lib/webdrivers.rb:4:in `<main>'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
       # /home/pedro/.rvm/gems/ruby-3.0.1/gems/bundler-1.17.3/lib/bundler.rb:114:in `require'
       # ./config/application.rb:7:in `<top (required)>'
       # ./config/environment.rb:2:in `require_relative'
       # ./config/environment.rb:2:in `<top (required)>'
       # ./spec/rails_helper.rb:4:in `require'
       # ./spec/rails_helper.rb:4:in `<top (required)>'
       # ./spec/models/user_spec.rb:1:in `require'
       # ./spec/models/user_spec.rb:1:in `<top (required)>'
       No examples found.
     
       Finished in 0.00005 seconds (files took 0.86508 seconds to load)
       0 examples, 0 failures, 1 error occurred outside of examples
     
       /home/pedro/.rvm/rubies/ruby-3.0.1/bin/ruby -I/home/pedro/.rvm/gems/ruby-3.0.1/gems/rspec-core-3.10.1/lib:/home/pedro/.rvm/gems/ruby-3.0.1/gems/rspec-support-3.10.2/lib /home/pedro/.rvm/gems/ruby-3.0.1/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed

@VSPPedro
Copy link
Collaborator Author

Removing webdrivers gem did the job. What do you think, @mcmire?

Copy link
Collaborator

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work! I'm happy with this.

@@ -49,7 +53,7 @@ jobs:
- uses: actions/cache@v2
with:
path: vendor/bundle
key: v1-rubygems-local-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles(format('gemfiles/{0}.gemfile.lock', matrix.rails_appraisal)) }}
key: v1-rubygems-local-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles(format('gemfiles/{0}.gemfile.lock', matrix.appraisal)) }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops 😅 nice!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants