In Ruby 3, rexml was promoted to a bundled gem, meaning it cannot simply be required, it has to be explicitly mentioned in the gemspec/gemfile. This causes a runtime failure in twine when running it with Ruby 3.
The workaround is to explicitly include rexml alongside twine, for example if using bundler
gem "twine"
gem "rexml"
I am not very familiar with packaging gems, but it seems likely that there is a way to specify the rexml dependency in twine such that it is compatible with both Ruby 2 and 3.
In Ruby 3, rexml was promoted to a bundled gem, meaning it cannot simply be required, it has to be explicitly mentioned in the gemspec/gemfile. This causes a runtime failure in twine when running it with Ruby 3.
The workaround is to explicitly include rexml alongside twine, for example if using bundler
I am not very familiar with packaging gems, but it seems likely that there is a way to specify the rexml dependency in twine such that it is compatible with both Ruby 2 and 3.