我正在一台新机器上构建一个现有的asciidoc项目,当它在我的旧机器上工作时,它会抛出以下错误:
$ bundle exec asciidoctor-pdf book.adoc
bundler: failed to load command: asciidoctor-pdf (/book/vendor/bundle/ruby/3.1.0/bin/asciidoctor-pdf)
/book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `require': cannot load such file -- matrix (LoadError)
from /book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `require_relative'
from /book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/lib/asciidoctor/pdf.rb:5:in `require'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/lib/asciidoctor/pdf.rb:5:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/bin/asciidoctor-pdf:5:in `require'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/bin/asciidoctor-pdf:5:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/bin/asciidoctor-pdf:25:in `load'
from /book/vendor/bundle/ruby/3.1.0/bin/asciidoctor-pdf:25:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli/exec.rb:58:in `load'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli/exec.rb:23:in `run'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli.rb:484:in `exec'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli.rb:31:in `dispatch'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli.rb:25:in `start'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/exe/bundle:48:in `block in <top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/exe/bundle:36:in `<top (required)>'
from /opt/homebrew/opt/ruby/bin/bundle:25:in `load'
from /opt/homebrew/opt/ruby/bin/bundle:25:in `<main>'
我使用的是bundler
2.3.8,我的Gemfile
源代码是:
source 'https://rubygems.org'
gem 'asciidoctor', "2.0.17"
gem 'asciidoctor-pdf', "1.6.2"
https://stackoverflow.com/questions/71392585
复制相似问题