Skip to content

Commit 5f1ff8e

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 5f1ff8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ci/script/functions.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ function run_spec_suite_for {
8282
unset BUNDLE_GEMFILE
8383
bundle_install_flags="--binstubs --standalone --without documentation --path ../bundle"
8484
travis_retry eval "(unset RUBYOPT; exec bundle install $bundle_install_flags)"
85+
if [ $1 == rspec-rails ]; then
86+
unset RUBYOPT
87+
fi;
8588
run_specs_and_record_done
8689
popd
8790
else

0 commit comments

Comments
 (0)