rubyonjets / jets

Ruby on Jets
http://rubyonjets.com
MIT License
2.6k stars 181 forks source link

Fresh install of jets 5.0.8 cannot load such file authorizer #703

Closed jeremiahlukus closed 10 months ago

jeremiahlukus commented 10 months ago

Checklist

My Environment

Software Version
Operating System macOS 14.1.1
Jets jets-5.0.8
Ruby ruby 3.2.0

Expected Behaviour

Able to run any jets commands

Current Behavior

I am able to run jets new ... but after that all jets commands give the same error

Like jets --version or any jets commands

 ➜  jets-test git:(main) jets server
/Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/helpers.rb:135:in `require': cannot load such file -- /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/jets-5.0.8/lib/jets/authorizer (LoadError)
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/helpers.rb:135:in `const_get'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/helpers.rb:135:in `cget'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/eager_load.rb:182:in `block in actual_eager_load_dir'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/helpers.rb:40:in `block in ls'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/helpers.rb:25:in `each'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/helpers.rb:25:in `ls'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/eager_load.rb:170:in `actual_eager_load_dir'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/eager_load.rb:17:in `block (2 levels) in eager_load'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/eager_load.rb:16:in `each'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/eager_load.rb:16:in `block in eager_load'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/eager_load.rb:10:in `synchronize'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/loader/eager_load.rb:10:in `eager_load'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/jets-5.0.8/lib/jets.rb:29:in `<top (required)>'
    from <internal:/Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from <internal:/Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/jets-5.0.8/exe/jets:4:in `<top (required)>'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/bin/jets:25:in `load'
    from /Users/jeremiah.parrack/.rbenv/versions/3.2.0/bin/jets:25:in `<main>'

Step-by-step reproduction instructions

Uninstall all versions of jets, run gem install jets, run jets --version

Code Sample

Solution Suggestion

Im trying to narrow down the issue working my way through the Jets::Autoloaders class.

tongueroo commented 10 months ago

Bummer.

P.S. Fixed the jets --version outside of a jets project to report correctly in #704

jeremiahlukus commented 10 months ago

https://community.boltops.com/t/could-not-find-timeout-0-3-1-in-any-of-the-sources/996

Doing this worked

gem install --default bundler
gem update --system
bundle update --bundler