Skip to content

Fix issues blocking usage with modern Ruby (3.0+) - #65

Open
transplier wants to merge 7 commits into
Dan-Q:masterfrom
transplier:ruby-3
Open

Fix issues blocking usage with modern Ruby (3.0+)#65
transplier wants to merge 7 commits into
Dan-Q:masterfrom
transplier:ruby-3

Conversation

@transplier

Copy link
Copy Markdown

At some point in the last few years (likely around Ruby 3.2.0), this project stopped working on modern ruby:

  • The gem explicitly refused to install under Ruby 3 (spec.required_ruby_version = '~> 2').
  • Ruby 3.2.0 removed File.exists?, causing most functionality to break.
  • Bypassing the gem version check, the last version that could theoretically run this software was 3.1.0, which went out of support earlier this year.

To support our usage, I went ahead and:

  • Switched to File.exist?
  • Updated the main gems (notable exception: haml 6 removed helpers the documentation site depends on, and I wasn't able to find any migration path that preserved formatting - so I just went to haml 5).
  • Modernized gem setup.
  • Replaced long-deprecated sass gem with sassc.
  • Set minimum ruby version to the oldest still-supported ruby version (3.2).
  • Set .ruby-version to latest release (3.4.7) (and added .tool-version for folks using asdf etc)

My partner and I just started our Twee2 journey, so pardon any oversights.

I tested (on Kubuntu 24.04.03 LTS):

  • Generation of "Escape From Earth" sample story from the documentation.
  • Reversing the generated html.
  • Building the public website (not deployed, obviously).

I also noticed that the results of rake web:build are committed into the repo. Would you like me to check in the generated assets as well?

@transplier
transplier marked this pull request as ready for review November 15, 2025 05:32
@transplier

Copy link
Copy Markdown
Author

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.

1 participant