decidim / decidim

The participatory democracy framework. A generator and multiple gems made with Ruby on Rails
https://decidim.org/
GNU Affero General Public License v3.0
1.47k stars 402 forks source link

install_all task doesn't work (`undefined method `doc_dir' for nil:NilClass`) #12113

Closed andreslucena closed 8 months ago

andreslucena commented 10 months ago

Describe the bug

When running the task bundle exec rake install_all, it doesn't finish the process and gives an error

To Reproduce

  1. On develop, run the task bundle exec rake install_all

Expected behavior

To not see any exception

Screenshots

No response

Stacktrace

(...)
Parsing documentation for ffi-1.16.3
Parsing documentation for graphql-2.0.27
Parsing documentation for jwt-2.7.1
Parsing documentation for decidim-admin-0.29.0.dev
Done installing documentation for ffi, graphql, jwt, decidim-admin after 2 seconds
Successfully installed graphql-2.0.27
Successfully installed decidim-api-0.29.0.dev
ERROR:  While executing gem ... (NoMethodError)
    undefined method `doc_dir' for nil:NilClass

    @doc_dir   = spec.doc_dir
                     ^^^^^^^^
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/3.1.0/rdoc/rubygems_hook.rb:86:in `initialize'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/3.1.0/rdoc/rubygems_hook.rb:56:in `new'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/3.1.0/rdoc/rubygems_hook.rb:56:in `block in generation_hook'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/3.1.0/rdoc/rubygems_hook.rb:55:in `each'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/3.1.0/rdoc/rubygems_hook.rb:55:in `generation_hook'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:313:in `block in install_hooks'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:312:in `each'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:312:in `install_hooks'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:210:in `install'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:215:in `install_gem'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:231:in `block in install_gems'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:224:in `each'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:224:in `install_gems'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/commands/install_command.rb:170:in `execute'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/command.rb:328:in `invoke_with_build_args'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:253:in `invoke_command'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:193:in `process_args'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/command_manager.rb:151:in `run'
        /home/apereira/.asdf/installs/ruby/3.1.1/lib/ruby/site_ruby/3.1.0/rubygems/gem_runner.rb:56:in `run'
        /home/apereira/.asdf/installs/ruby/3.1.1/bin/gem:12:in `<main>'

Extra data

Additional context

No response

alecslupu commented 9 months ago

Same error in:

Successfully installed decidim-elections-0.29.0.dev
ERROR:  While executing gem ... (NoMethodError)
    undefined method `doc_dir' for nil:NilClass

    @doc_dir   = spec.doc_dir
                     ^^^^^^^^
alecslupu commented 9 months ago

@andreslucena I have investigated the issue, and I do not have a resolution to it.

The decidim-api error was caused by wrong version of graphql-docs ( upgrading from ~> 3.0.1 to ~> 4.0 apparently is fixing the issue) The decidim-elections error apparently not caused by election module, but by dev module. If you comment out the following gems, you should have a successful result of bundle exec rake install_all:

I have tried to upgrade rubocop to 1.59 and erb_lint to 0.5.0 to replicate the fix in api, but i got no successful result. Please advise.

andreslucena commented 9 months ago

The decidim-elections error apparently not caused by election module, but by dev module.

As we shortly be extracting this module to the decidim-bulletin-board repository, we could retake this after that