My rails 7.1 deployment on Ubuntu 22.04 has been working flawlessly, and then this morning, I tried to to
bundle install
And I’m getting this message:
Using google-apis-drive_v3 0.50.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/deploy/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/nokogiri-1.18.0/ext/nokogiri
/home/deploy/.rbenv/versions/3.1.0/bin/ruby -I /home/deploy/.rbenv/versions/3.1.0/lib/ruby/3.1.0 -r ./siteconf20241226-151208-1eq4nd.rb extconf.rb
checking for whether -std=c99 is accepted as CFLAGS... yes
checking for whether -Wno-declaration-after-statement is accepted as CFLAGS... yes
checking for whether -O2 is accepted as CFLAGS... yes
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
checking for whether -Wconversion is accepted as CFLAGS... no
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.
The contents of my Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '3.1.0'
gem 'rails', '7.1'
gem 'sprockets-rails', '~> 3.4.2'
gem 'mysql2', '~> 0.5.6'
gem 'activerecord-import', '~> 1.6.0'
gem 'puma', '< 7'
gem 'importmap-rails', '~> 2.0.1'
gem 'turbo-rails', '~> 2.0.5'
gem 'stimulus-rails', '1.3.3'
gem 'tailwindcss-rails', '~> 2.0.10'
gem 'jbuilder', '~> 2.11.5'
gem 'redis', '~> 4.0'
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
gem "bootsnap", "~> 1.18.3", require: false
gem 'slim-rails', '~> 3.6.3'
gem 'devise', '~> 4.9.4'
gem 'rolify', '~> 6.0.1'
gem 'ahoy_matey', '~> 5.1.0'
gem 'faraday', '~> 1.7'
gem 'faraday_middleware', '~> 1.1'
gem 'calendly', '~> 0.14.0'
gem 'aws-sdk'
gem 'google-apis-admin_directory_v1', '~> 0.33.0'
gem 'google-apis-calendar_v3', '~> 0.23.0'
gem 'google-apis-drive_v3', '~> 0.50.0'
gem 'zipline', '~> 2.0.0'
gem 'rubyXL', '~> 3.4.27'
gem 'sidekiq', '~> 7.2.4'
gem 'sidekiq-cron', '~> 1.12'
gem 'chartkick', '~> 5.0.6'
gem 'jquery-slick-rails', '~> 1.10.0'
gem 'hexapdf', '~> 0.40.0'
gem 'wicked_pdf'
gem 'wkhtmltopdf-binary'
gem 'activerecord-session_store', '~> 2.1.0'
gem 'net-sftp', '~> 4.0.0'
group :development, :test, :testalt, :staging, :hotfix, :unit_test do
gem 'letter_opener_web', '~> 2.0.0'
end
group :development, :test, :testalt, :staging, :unit_test do
gem 'faker', '~> 3.3.1'
end
group :development, :test, :testalt, :unit_test do
gem 'capybara', '~> 3.40.0'
gem 'factory_bot_rails', '~> 6.4.3'
gem 'rspec-rails', '~> 6.1.2'
gem 'simplecov', '~> 0.22.0'
gem 'debug', '~> 1.9.2', platforms: %i[mri mingw x64_mingw]
end
group :development, :test, :testalt do
gem 'bullet', '~> 7.1.6'
end
group :development do
gem 'rubocop', '~> 1.63', require: false
gem 'web-console', '~> 4.2.1'
end
I tried:
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev -y
sudo apt-get install libxml2-dev libxslt1-dev -y
And then bundle install, but it did not work