Description
Hi, just found a weird issue where the deployment by Docker failed when the app code didn't change.
With:
- Ruby 3.2.2
- Rails 7.1.1
- sqlite3 1.6.9
- Docker image ruby:3-alpine3.19,
Starting the Rails server will raise an error:
LoadError: cannot load such file -- sqlite3/sqlite3_native (LoadError)
Caused by:
LoadError: Error relocating /usr/local/bundle/gems/sqlite3-1.6.9-aarch64-linux/lib/sqlite3/3.2/sqlite3_native.so: fcntl64: symbol not found - /usr/local/bundle/gems/sqlite3-1.6.9-aarch64-linux/lib/sqlite3/3.2/sqlite3_native.so (LoadError)
Later on, I figured out that it is caused by the Docker image ruby:3-alpine3.19
.
In the Dockerfile, we use FROM ruby:3-alpine as builder
, so it will fetch the latest image version when docker build
.
A few days ago, Alpine released version 3.19, which affected the ruby:3-alpine
Docker image, causing it to fetch ruby:3-alpine3.19
and resulting in this error.
We solved this issue by specifying the image version as ruby:3-alpine3.18
for now.
Just report this here to see what the problem may be and if there's anything sqlite3 could do.
You could find more information about Alpine 3.19 in the Release Notes for Alpine 3.19.
A rails new
app should reproduce the issue, and a Dockerfile example.