Skip to content

Commit 9daf94b

Browse files
committed
fix: Add workaround to fix nokogiri installation error
After installing Nokogiri v1.14, the installation of Nokogiri v1.11 fails. ``` Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/gems/2.7.0/gems/nokogiri-1.11.3/ext/nokogiri /opt/hostedtoolcache/Ruby/2.7.8/x64/bin/ruby -I /opt/hostedtoolcache/Ruby/2.7.8/x64/lib/ruby/2.7.0 -r ./siteconf20231010-5219-1a02hdd.rb extconf.rb checking for whether -g is accepted as CFLAGS... yes checking for whether -Winline is accepted as CFLAGS... yes checking for whether -Wmissing-noreturn is accepted as CFLAGS... yes Building nokogiri using packaged libraries. Static linking is enabled. Cross build is disabled. *** 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. ``` Therefore, install nokogiri from old versions by using `reverse_each`.
1 parent f0df6df commit 9daf94b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ end
2020

2121
desc 'Generate adn build documentation for older versions of Rails'
2222
task :build_multi do
23-
config['rails_versions'].each do |version, detail|
23+
# WORKAROUND: use `reverse_each` instead of `each` to avoid nokogiri installation error
24+
config['rails_versions'].reverse_each do |version, detail|
2425
dir = "#{SOURCE_DIR}/#{version}"
2526
mkdir dir unless Dir.exist?(dir)
2627

0 commit comments

Comments
 (0)