Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4616

How to fix a bundler error when upgrading Ruby from version 2.7.5 to version 3.0.6?

$
0
0

I was updating the Ruby version on my rails application. I updated from version 2.7.5 to version 3.0.6. I fixed all the broken dependencies and my project is successfully launched using the rails s command. But for some reason I can’t run rspec tests.

In my config/application.rb file the following line is throwing an error.

Bundler.require(*Rails.groups)

The error is like this:

ArgumentError:  wrong number of arguments (given 4, expected 3)# ./config/application.rb:16:in `<top (required)>'# ./config/environment.rb:4:in `require_relative'# ./config/environment.rb:4:in `<top (required)>'# ./spec/rails_helper.rb:8:in `<top (required)>'

What's strange is that this error only reproduces when there is a :test or 'test' in the Rails.groups array.That is, if, for example, you give the Bundler.require such an array as input -> [:default] then there will be no error

version of my rails app: 6.1.7.4


Viewing all articles
Browse latest Browse all 4616

Trending Articles