Closed jcoyne closed 3 months ago
On ruby 3.2 we see this manifestation of the problem in Spotlight. Curiously, we do not see this error in Blacklight.
...
Installing rails 7.0.8.4
Bundle complete! 11 Gemfile dependencies, 62 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
run bundle binstubs bundler
rails importmap:install
/opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/definition.rb:594:in `materialize': Could not find rails-7.0.8.4, sprockets-rails-3.5.1, sqlite3-1.7.3-x86_64-linux, puma-5.6.8, importmap-rails-2.0.1, turbo-rails-2.0.5, stimulus-rails-1.3.3, debug-1.9.2, web-console-4.2.1, actioncable-7.0.8.4, actionmailbox-7.0.8.4, actionmailer-7.0.8.4, actionpack-7.0.8.4, actiontext-7.0.8.4, actionview-7.0.8.4, activejob-7.0.8.4, activemodel-7.0.8.4, activerecord-7.0.8.4, activestorage-7.0.8.4, activesupport-7.0.8.4, railties-7.0.8.4, sprockets-4.2.1, irb-1.13.2, reline-0.5.9, bindex-0.8.1, rdoc-6.7.0, io-console-0.7.2, psych-5.1.2, stringio-3.1.1 in locally installed gems (Bundler::GemNotFound)
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/definition.rb:193:in `specs'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/definition.rb:259:in `specs_for'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/runtime.rb:18:in `setup'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler.rb:164:in `setup'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/setup.rb:32:in `block in <top (required)>'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/ui/shell.rb:159:in `with_level'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/ui/shell.rb:111:in `silence'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/setup.rb:32:in `<top (required)>'
from <internal:/opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
from <internal:/opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems.rb:1370:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
rails turbo:install stimulus:install
/opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/definition.rb:594:in `materialize': Could not find rails-7.0.8.4, sprockets-rails-3.5.1, sqlite3-1.7.3-x86_64-linux, puma-5.6.8, importmap-rails-2.0.1, turbo-rails-2.0.5, stimulus-rails-1.3.3, debug-1.9.2, web-console-4.2.1, actioncable-7.0.8.4, actionmailbox-7.0.8.4, actionmailer-7.0.8.4, actionpack-7.0.8.4, actiontext-7.0.8.4, actionview-7.0.8.4, activejob-7.0.8.4, activemodel-7.0.8.4, activerecord-7.0.8.4, activestorage-7.0.8.4, activesupport-7.0.8.4, railties-7.0.8.4, sprockets-4.2.1, irb-1.13.2, reline-0.5.9, bindex-0.8.1, rdoc-6.7.0, io-console-0.7.2, psych-5.1.2, stringio-3.1.1 in locally installed gems (Bundler::GemNotFound)
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/definition.rb:193:in `specs'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/definition.rb:259:in `specs_for'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/runtime.rb:18:in `setup'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler.rb:164:in `setup'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/setup.rb:32:in `block in <top (required)>'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/ui/shell.rb:159:in `with_level'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/ui/shell.rb:111:in `silence'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.5.14/lib/bundler/setup.rb:32:in `<top (required)>'
from <internal:/opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
from <internal:/opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:86:in `require'
from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/rubygems.rb:1370:in `<top (required)>'
from <internal:gem_prelude>:2:in `require'
from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
This was caused by using the github bundler caching.
It seems like it can't find the rails tasks for the gem it just installed:
The gem is added here: https://github.com/rails/rails/blob/main/railties/lib/rails/generators/app_base.rb#L317
and bundle install is called here: https://github.com/rails/rails/blob/main/railties/lib/rails/generators/app_base.rb#L414 And the generator is called here: https://github.com/rails/rails/blob/main/railties/lib/rails/generators/app_base.rb#L421
Possibly the problem is:
"BUNDLE_GEMFILE"=>"/Users/jcoyne85/workspace/projectblacklight/blacklight/Gemfile"