Skip to content

Commit f410cc9

Browse files
ci: use Ruby with latest rubygems version
The CI was failing with the following error when running with Ruby 3.0 against `devise` 3.0. ``` Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/runner/work/devise-webauthn/devise-webauthn/vendor/bundle/ruby/3.0.0/gems/sqlite3-2.0.4/ext/sqlite3 /opt/hostedtoolcache/Ruby/3.0.7/x64/bin/ruby -I /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0 -r ./siteconf20260303-2303-pvjn4q.rb extconf.rb Building sqlite3-ruby using packaged sqlite3. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. from extconf.rb:51:in `configure_packaged_libraries' from extconf.rb:17:in `configure' from extconf.rb:284:in `<main>' extconf failed, exit code 1 Gem files will remain installed in /home/runner/work/devise-webauthn/devise-webauthn/vendor/bundle/ruby/3.0.0/gems/sqlite3-2.0.4 for inspection. Results logged to /home/runner/work/devise-webauthn/devise-webauthn/vendor/bundle/ruby/3.0.0/extensions/x86_64-linux/3.0.0/sqlite3-2.0.4/gem_make.out /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:93:in `run' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:47:in `block in build' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/tempfile.rb:317:in `open' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:26:in `build' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:159:in `build_extension' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:193:in `block in build_extensions' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `each' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `build_extensions' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/rubygems/installer.rb:837:in `build_extensions' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/rubygems_gem_installer.rb:71:in `build_extensions' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/rubygems_gem_installer.rb:28:in `install' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/source/rubygems.rb:204:in `install' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/installer/gem_installer.rb:54:in `install' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/installer/gem_installer.rb:16:in `install_from_spec' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:186:in `do_install' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:177:in `block in worker_pool' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/worker.rb:62:in `apply_func' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/worker.rb:57:in `block in process_queue' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/worker.rb:54:in `loop' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/worker.rb:54:in `process_queue' /opt/hostedtoolcache/Ruby/3.0.7/x64/lib/ruby/3.0.0/bundler/worker.rb:91:in `block (2 levels) in create_threads' An error occurred while installing sqlite3 (2.0.4), and Bundler cannot continue. In devise_5_0.gemfile: sqlite3 ``` This is an known issue for Rubies 2.6 up to 3.1 when used with rubygems older than v3.4.9: ruby/rubygems#6611. This commits uses `setup-ruby`'s `rubygems` params so that the latest available `rubygems` version is used for our rubies. References: - ruby/rubygems#6611 - https://github.com/ruby/setup-ruby/blob/896e71e063dc0933bb442a54e949d75291991ecb/action.yml#L11-L17
1 parent 10cad17 commit f410cc9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.github/workflows/ruby.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
uses: ruby/setup-ruby@v1
8080
with:
8181
ruby-version: ${{ matrix.ruby }}
82+
rubygems: latest
8283
bundler-cache: true
8384

8485
- name: Run tests

0 commit comments

Comments
 (0)