Skip to content

docs - main (ruby): declare the gems Ruby 3.4 dropped, and make the first example runnable - #46

Merged
karenc-bq merged 3 commits into
mainfrom
chore/restructure
Oct 28, 2026
Merged

karenc-bq merged 3 commits into
mainfrom
chore/restructure

Conversation

@karenc-bq

Copy link
Copy Markdown
Contributor

Description

Issue. Following the Ruby Getting started section did not produce a working program. The documented Gemfile raised LoadError on the first require, and the only connection example was two constructor fragments with no query, no teardown and no command to run them.

Root cause. Ruby 3.4 removed base64, bigdecimal, fiddle and logger from the default gems. aws_advanced_ruby_driver_wrapper requires all four at load time and declares none of them. LoadError names one gem per attempt, so a reader finds them one rerun at a time.

Fix. Step 1 gains a warning listing the four gems. The driver-direct example is one complete runnable program. A warning records the exec difference, and a note gives the alternatives to a password in source. No section moved.

Measured effect

An agent was given the cluster, the credentials, and nothing to read but this documentation, then asked for a working program. Five runs per side, same model and agent build.

xychart-beta
    title "Median billed tokens for a first set-up"
    x-axis ["main", "this branch"]
    y-axis "billed tokens" 0 --> 220000
    bar [188965, 93067]
Loading
main this branch
Median billed tokens 188,965 93,067 -51%
Median model calls 11 7 -36%
Cheapest to dearest run 2.6x 1.3x
Runs producing a working program 5 of 5 5 of 5
xychart-beta
    title "Every run, sorted cheapest first (bars main, line this branch)"
    x-axis ["1", "2", "3", "4", "5"]
    y-axis "billed tokens" 0 --> 300000
    bar [108221, 161378, 188965, 215548, 278158]
    line [91470, 92757, 93067, 93234, 122174]
Loading

Runs on main split by whether the reader hit the missing gems; four of five on this branch sit within 1,800 tokens. Every run on both sides ended in a working program, so this buys cost and predictability rather than correctness.

Checklist

  • I read CONTRIBUTING.md.
  • This change is to the docs, not to a wrapper's source (those go in the wrapper's own repo).
  • I built the site locally and the affected pages render correctly.
  • Links I added or changed resolve, including the wrapper-switched variants where relevant.
  • No security-sensitive information is included (see SECURITY.md).

@karenc-bq
karenc-bq requested a review from a team as a code owner October 21, 2026 18:59
sophia-bq
sophia-bq previously approved these changes Oct 21, 2026
Comment thread content/failover.yaml Resolved
Comment thread content/failover.yaml Resolved
Comment thread content/failover.yaml Resolved
Comment thread content/failover.yaml Resolved
aaron-congo
aaron-congo previously approved these changes Oct 22, 2026
Comment thread content/failover.yaml Outdated
makes keep working, and the plugins act on each one.
- text: |
:::warning
`exec` returns its result and does not yield to a block, unlike

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a bug that needs to be fixed? Sounds like it

Comment thread README.md Resolved
@karenc-bq
karenc-bq dismissed stale reviews from aaron-congo and sophia-bq via 9f5953a October 22, 2026 21:03
sophia-bq
sophia-bq previously approved these changes Oct 22, 2026
aaron-congo
aaron-congo previously approved these changes Oct 23, 2026
Comment thread content/failover.yaml Outdated
Comment on lines +116 to +117
Ruby 3.4 removed these from the default gems, so a bundle without them
raises `LoadError` on the first require.

@aaron-congo aaron-congo Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruby 3.4 only removed base64 and bigdecimal from the default gems; logger was removed in Ruby 4.0. Also, mysql2 requires fiddle on Windows (to load libmysql.dll) without declaring it, so on Windows with Ruby 4.0 or later require 'mysql2' raises LoadError unless the Gemfile includes fiddle. That applies with Active Record too, since Active Record doesn't depend on fiddle.

Suggested change
Ruby 3.4 removed these from the default gems, so a bundle without them
raises `LoadError` on the first require.
Ruby 3.4 removed `base64` and `bigdecimal` from the default gems, and Ruby 4.0
removed `logger`, so a bundle without them raises `LoadError` on the first require.
On Windows with Ruby 4.0 or later, `mysql2` also needs `gem 'fiddle'` in your
Gemfile.

@karenc-bq
karenc-bq merged commit 0576b47 into main Oct 28, 2026
5 checks passed
@karenc-bq
karenc-bq deleted the chore/restructure branch October 28, 2026 23:50
@aaron-congo aaron-congo mentioned this pull request Nov 4, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants