How to avoid platform-specific gems in Gemfile.lock

42 Views Asked by At

After a recent update of bundler or Rubygems, I saw these updates in Gemfile.lock:

-    sqlite3 (1.6.9)
+    sqlite3 (1.7.0-arm64-darwin)

-  ruby
+  arm64-darwin-22
+  arm64-darwin-23

I really need my Gemfile.lock to be platform agnostic, since I have to build a Docker image and deploy by copying the gems from the Docker image to a server (airgapped server).

What's going on, and how do I preserve the platform agnosticity in the Gemfile.lock?

For the record, these were the versions I was using when I discovered the issue:

$ bundle --version
Bundler version 2.3.26
$ gem --version
3.4.10
$ ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
0

There are 0 best solutions below