From a0815a3389cfb29eb0eff14664475201e082aa3d Mon Sep 17 00:00:00 2001 From: Robin Stammer Date: Fri, 6 Jun 2025 10:36:26 +0200 Subject: [PATCH 1/4] Drop use of deprecated Rails::ConsoleMethods railties/lib/rails/console/methods.rb has been deprecated and will be removed in Rails 8.1. In order to make it work, we have to drop the reference to it and upgrade iruby to v0.8.1. Co-authored-by: Daniel Nunez --- jupyter_on_rails.gemspec | 2 +- lib/jupyter_on_rails/initializer.rb | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/jupyter_on_rails.gemspec b/jupyter_on_rails.gemspec index 65f11c1..2039cf3 100644 --- a/jupyter_on_rails.gemspec +++ b/jupyter_on_rails.gemspec @@ -43,7 +43,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake' spec.add_development_dependency 'rubocop' - spec.add_dependency 'iruby' + spec.add_dependency 'iruby', '>= 0.8.1' spec.add_dependency 'railties' spec.add_dependency 'daru' diff --git a/lib/jupyter_on_rails/initializer.rb b/lib/jupyter_on_rails/initializer.rb index 642afaa..3c0f99c 100644 --- a/lib/jupyter_on_rails/initializer.rb +++ b/lib/jupyter_on_rails/initializer.rb @@ -61,12 +61,10 @@ def load_rails_environment end def setup_console_methods - require 'rails/console/app' IRuby::Kernel .instance .instance_variable_get(:@backend) .instance_variable_get(:@main) - .extend(Rails::ConsoleMethods) end def setup_sandbox_transaction From 4a20efa53334c1be233de2c9a87646db14bce477 Mon Sep 17 00:00:00 2001 From: Robin Stammer Date: Fri, 6 Jun 2025 11:26:26 +0200 Subject: [PATCH 2/4] Update actions/checkout and actions/cache for GitHub actions workflow --- .github/workflows/ruby.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 123b5e1..4c7d73f 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -10,14 +10,14 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 3.2.2 bundler-cache: true # https://github.com/actions/cache/blob/master/examples.md#ruby---bundler - - uses: actions/cache@v1 + - uses: actions/cache@v4 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} From 6984a241e32e8d7da71193a0d33008a20dad76f9 Mon Sep 17 00:00:00 2001 From: Robin Stammer Date: Fri, 6 Jun 2025 11:32:26 +0200 Subject: [PATCH 3/4] Use newer Ruby version for GitHub actions --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 4c7d73f..ccdfa0d 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.2 + ruby-version: 3.3 bundler-cache: true # https://github.com/actions/cache/blob/master/examples.md#ruby---bundler - uses: actions/cache@v4 From 7e61e72a48cc487f16fe696491327d9080815430 Mon Sep 17 00:00:00 2001 From: Robin Stammer Date: Fri, 6 Jun 2025 11:36:17 +0200 Subject: [PATCH 4/4] Fixiate platform for GitHub actions --- Gemfile.lock | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2207480..c3fabaf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ PATH specs: jupyter_on_rails (0.13.0) daru - iruby + iruby (>= 0.8.1) railties GEM @@ -95,15 +95,16 @@ GEM io-console (0.5.11) irb (1.4.1) reline (>= 0.3.0) - iruby (0.7.4) + iruby (0.8.2) data_uri (~> 0.1) ffi-rzmq irb + logger mime-types (>= 3.3.1) multi_json (~> 1.11) - native-package-installer json (2.6.3) language_server-protocol (3.17.0.3) + logger (1.7.0) loofah (2.21.3) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -115,7 +116,6 @@ GEM minitest (5.19.0) multi_json (1.15.0) multipart-post (2.1.1) - native-package-installer (1.1.4) nio4r (2.5.7) nokogiri (1.15.2) mini_portile2 (~> 2.8.2) @@ -188,6 +188,7 @@ GEM PLATFORMS ruby + x86_64-linux DEPENDENCIES bump @@ -197,4 +198,4 @@ DEPENDENCIES rubocop BUNDLED WITH - 2.2.22 + 2.6.8