prawnpdf/prawn

Ruby 3.1 compatibilty

NordGus opened this issue · 6 comments

/usr/local/bundle/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `require': cannot load such file -- matrix (LoadError)
        from /usr/local/bundle/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `<top (required)>'
        from /usr/local/bundle/gems/prawn-2.4.0/lib/prawn.rb:67:in `require_relative'
        from /usr/local/bundle/gems/prawn-2.4.0/lib/prawn.rb:67:in `<top (required)>'
        from /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:60:in `require'
        from /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:60:in `block (2 levels) in require'
        from /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:55:in `each'
        from /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:55:in `block in require'
        from /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:44:in `each'
        from /usr/local/lib/ruby/3.1.0/bundler/runtime.rb:44:in `require'
        from /usr/local/lib/ruby/3.1.0/bundler.rb:176:in `require'
        from /var/app/config/application.rb:19:in `<top (required)>'
        from /usr/local/bundle/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:137:in `require'
        from /usr/local/bundle/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:137:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from /usr/local/bundle/gems/railties-7.0.3.1/lib/rails/commands/server/server_command.rb:134:in `perform'
        from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /usr/local/bundle/gems/railties-7.0.3.1/lib/rails/command/base.rb:87:in `perform'
        from /usr/local/bundle/gems/railties-7.0.3.1/lib/rails/command.rb:48:in `invoke'
        from /usr/local/bundle/gems/railties-7.0.3.1/lib/rails/commands.rb:18:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

Hey the gem is not compatible with Ruby 3.1

To make it work with a new Rails project I had to add gem "matrix", "~> 0.4" to my Gemfile. Maybe this should be added as a dependency.

It is added in the master. It will be in the next release.

@NordGus Duplicate, see #1235 and #1195, therefore closing the issue.

Would it be possible to cut a release that includes this update? I can't deploy Prawn to Heroku running Ruby 3.1 or 3.2 without pointing directly to master.

@joemasilotti Eventually. Just out of curiosity, how do you imagine a release will be different from master?

I feel safer knowing I can lock into a version release instead of pointing to a branch. And if/when things change in the future, I can assess how to upgrade based on semantic versioning.