From 0844964fd700d1ca1999e8b8df7a7c2779db0ac1 Mon Sep 17 00:00:00 2001 From: Yaakov Shaul Date: Thu, 14 May 2026 10:15:26 -0400 Subject: [PATCH 1/2] Fix native extension load path for source gem installs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the gem is installed from source (gem install), extconf.rb builds the native extension to lib/restate_internal.bundle. But vm.rb is in lib/restate/ and uses require_relative, so the fallback resolves to lib/restate/restate_internal — which doesn't exist. Add a third fallback that looks one directory up to find the extension at lib/restate_internal where source builds place it. Co-authored-by: Cursor --- lib/restate/vm.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/restate/vm.rb b/lib/restate/vm.rb index 5fa7da5..3c22656 100644 --- a/lib/restate/vm.rb +++ b/lib/restate/vm.rb @@ -7,8 +7,13 @@ RUBY_VERSION =~ /(\d+\.\d+)/ require_relative "#{Regexp.last_match(1)}/restate_internal" rescue LoadError - # Fall back to the default location (development builds, source gem installs) - require_relative 'restate_internal' + begin + # rake compile output (ext.lib_dir = 'lib/restate' in Rakefile) + require_relative 'restate_internal' + rescue LoadError + # gem install from source: extconf.rb builds to lib/restate_internal + require_relative '../restate_internal' + end end module Restate From 59afaf2f72ad5d539cb796b8db70a6ab2e497d39 Mon Sep 17 00:00:00 2001 From: Yaakov Shaul Date: Thu, 14 May 2026 10:22:59 -0400 Subject: [PATCH 2/2] Add libssl-dev to test-services runtime image The falcon gem (0.55.3) depends on the openssl gem (4.0.2) which requires OpenSSL development headers to compile its native extension. The slim Docker image doesn't include these by default. Co-authored-by: Cursor --- test-services/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-services/Dockerfile b/test-services/Dockerfile index a19335b..8b330fc 100644 --- a/test-services/Dockerfile +++ b/test-services/Dockerfile @@ -26,9 +26,9 @@ RUN bundle install && bundle exec rake compile # ── Runtime stage ── FROM ruby:3.3-slim-bookworm AS test-services -# Install build tools for native gem extensions (e.g. json) +# Install build tools and OpenSSL dev headers for native gem extensions RUN apt-get update -y && \ - apt-get install -y build-essential && \ + apt-get install -y build-essential libssl-dev && \ rm -rf /var/lib/apt/lists/* WORKDIR /usr/src/app