Skip to content

Commit a8ec697

Browse files
committed
Unset no-rubygems option for rspec-rails sub-job
Rails do use Gem in rails/railties/lib/rails/ruby_version_check.rb if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0") and obviously since RubyGems are loaded by default by recent rubies, it doesn't care to explicitly require it. That results in: /home/runner/work/rspec-expectations/rspec-rails/bin/rspec An error occurred while loading spec_helper. Failure/Error: require 'rails/all' NameError: uninitialized constant Gem # /home/runner/work/rspec-expectations/bundle/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails/ruby_version_check.rb:3:in `<top (required)>' # /home/runner/work/rspec-expectations/bundle/ruby/2.5.0/gems/railties-6.0.3.4/lib/rails.rb:3:in `require'
1 parent 4b36694 commit a8ec697

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/script/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,6 @@ function run_all_spec_suites {
187187
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks"
188188
fold "rspec-support specs" run_spec_suite_for "rspec-support"
189189
if rspec_rails_compatible; then
190-
fold "rspec-rails specs" run_spec_suite_for "rspec-rails"
190+
fold "rspec-rails specs" (unset RUBYOPT && run_spec_suite_for "rspec-rails")
191191
fi
192192
}

0 commit comments

Comments
 (0)