File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 4343 env = with_standard_compiler_flags ( with_embedded_path )
4444 env [ 'PATH' ] = "#{ env [ 'PATH' ] } :#{ install_dir } /embedded/nodejs/bin"
4545
46- bundle "config build.nokogiri --use-system-libraries" \
46+ # Create .bundle directory for configuration
47+ mkdir "#{ project_dir } /.bundle"
48+
49+ # Create a bundle config file to force platform to ruby
50+ File . open ( "#{ project_dir } /.bundle/config" , "w" ) do |f |
51+ f . puts "---"
52+ f . puts "BUNDLE_FORCE_RUBY_PLATFORM: 'true'"
53+ end
54+
55+ # Configure nokogiri to use system libraries and ruby platform
56+ bundle "config build.nokogiri --platform=ruby --use-system-libraries" \
4757 " --with-xml2-config=#{ install_dir } /embedded/bin/xml2-config" \
4858 " --with-xslt-config=#{ install_dir } /embedded/bin/xslt-config"
4959
5060 # Configure pg gem to use embedded PostgreSQL
5161 bundle "config build.pg --with-pg-config=#{ install_dir } /embedded/bin/pg_config" , env : env
5262
5363 bundle "config set --local without development test doc" , env : env
64+
65+ # Force install nokogiri with ruby platform
66+ bundle "config set force_ruby_platform true" , env : env
67+
5468 bundle "install" \
5569 " --path=#{ install_dir } /embedded/service/gem" , env : env
5670
Original file line number Diff line number Diff line change 1717# update `src/openresty-noroot/habitat/plan.sh` when updating this version.
1818override :openresty , version : "1.25.3.1"
1919
20- override :openssl , version : "1.0.2zi"
20+ override :openssl , version : "1.0.2zi"
21+
22+ # Force nokogiri to use Ruby platform for glibc compatibility
23+ override :nokogiri , version : "1.18.9"
You can’t perform that action at this time.
0 commit comments