Install Ruby 4.0.5 via ruby-install in Dockerfile
Replaces distro Ruby 3.3 packages with a source compile of Ruby 4.0.5
using ruby-install. Debian Trixies repos only ship Ruby 3.3, so we
build from source and set up GEM_HOME for bundle installs.

Assisted-by: Owl Alpha <https://openrouter.ai/models/alpha/owl-alpha>
change spsvunmmyzqqorsrxsmtrqzqkxkyrnwr
commit d3ab94aa26339416891ebbbb0fd9e1d8350e0248
author Alpha Chen <alpha@kejadlen.dev>
date
parent xsmpwowm
diff --git a/.ramekin/Dockerfile b/.ramekin/Dockerfile
index 84a8ae1..041c5d1 100644
--- a/.ramekin/Dockerfile
+++ b/.ramekin/Dockerfile
@@ -1,7 +1,37 @@
 FROM ramekin-agent
 
+# Ruby's build dependencies. ruby-install would normally install these via
+# apt itself, but we delete the apt index below, so install them here and pass
+# --no-install-deps to ruby-install.
 RUN apt-get update && apt-get install -y --no-install-recommends \
-    ruby ruby-dev ruby-bundler \
-    libsqlite3-dev \
     build-essential \
+    bison \
+    xz-utils \
+    libyaml-dev \
+    libgdbm-dev \
+    libreadline-dev \
+    libncurses-dev \
+    libssl-dev \
+    zlib1g-dev \
+    libffi-dev \
+    libsqlite3-dev \
+    curl \
     && rm -rf /var/lib/apt/lists/*
+
+# Install ruby-install
+RUN curl -L -o ruby-install-0.10.1.tar.gz https://github.com/postmodern/ruby-install/archive/v0.10.1.tar.gz \
+    && tar xzf ruby-install-0.10.1.tar.gz \
+    && cd ruby-install-0.10.1 \
+    && make install \
+    && cd / \
+    && rm -rf ruby-install-0.10.1 ruby-install-0.10.1.tar.gz
+
+# Install Ruby 4.0.5
+RUN ruby-install --cleanup --no-install-deps ruby 4.0.5
+
+ENV PATH="/opt/rubies/ruby-4.0.5/bin:${PATH}"
+ENV GEM_HOME="/usr/local/bundle"
+ENV GEM_PATH="/usr/local/bundle"
+ENV PATH="${GEM_HOME}/bin:${PATH}"
+
+RUN gem install bundler --no-document