redhataccess / ascii_binder

AsciiBinder is an AsciiDoc-based system for authoring and publishing closely related documentation sets from a single source.
https://asciibinder.net
MIT License
76 stars 39 forks source link

Starting in ruby 3.2, use File.exist? not File.exists? #179

Open jboxman-rh opened 1 year ago

jboxman-rh commented 1 year ago

https://stackoverflow.com/questions/14351272/why-do-i-get-undefined-method-exist-for-fileclass

ruby --version
ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-darwin21]
asciibinder build
Building all distributions.
WARN: The following branches do not exist in your local git repo:
- enterprise-3.0
- enterprise-3.1
- enterprise-3.10
- enterprise-3.11
- enterprise-3.2
- enterprise-3.3
- enterprise-3.4
- enterprise-3.5
- enterprise-3.6
- enterprise-3.7
- enterprise-3.9
- enterprise-4.2
- enterprise-4.3
- enterprise-4.4
- rhacs-docs-3.65
- rhacs-docs-3.66
- rhacs-docs-3.67
- rhacs-docs-3.68
- rhacs-docs-3.69
- rhacs-docs-3.70
- rhacs-docs-3.71
- rhacs-docs-3.72
- rhacs-docs-3.73
- rhacs-docs-3.74
- rosa-preview
The build will proceed but these branches will not be generated.
WARN: The /var/folders/wp/2w2lsjbx455331_54wn7vn400000gn/T/_topic_map.yml20230228-68042-mqxlze file on branch 'main' references 396 nonexistent topics. Set logging to 'debug' for details.
WARN: Branch main includes 11591 files that are not referenced in the /var/folders/wp/2w2lsjbx455331_54wn7vn400000gn/T/_topic_map.yml20230228-68042-56dok6 file. Set logging to 'debug' for details.
Building OKD for branch 'main'
Error: Could not generate docs:
NoMethodError: undefined method `exists?' for File:Class at
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/helpers.rb:139:in `preview_dir'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/distro_branch.rb:27:in `branch_path'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/distro_branch.rb:35:in `branch_stylesheet_dir'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/engine.rb:428:in `block (2 levels) in generate_docs'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/engine.rb:396:in `each'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/engine.rb:396:in `block in generate_docs'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/engine.rb:356:in `each'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/lib/ascii_binder/engine.rb:356:in `generate_docs'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/bin/asciibinder:18:in `call_generate'
    /usr/local/lib/ruby/gems/3.2.0/gems/ascii_binder-1.2/bin/asciibinder:328:in `<top (required)>'
    /usr/local/lib/ruby/gems/3.0.0/bin/asciibinder:23:in `load'
    /usr/local/lib/ruby/gems/3.0.0/bin/asciibinder:23:in `<main>'.
Try --help for help.