pulibrary / bibdata

Local API for retrieving bibliographic and other useful data from Alma (Ruby 3.1.0, Rails 7.1.3.4)
BSD 2-Clause "Simplified" License
16 stars 7 forks source link

Update Bundler Config in Bibdata #2322

Closed kevinreiss closed 4 months ago

kevinreiss commented 4 months ago

We need to apply the "bundler fix" to bibdata's environment.

Implementation Notes

Helpful troubleshooting info from the handbook. Errors from a deployment that failed because of bundler referenced in this issue.

maxkadel commented 4 months ago

See log tail /var/log/nginx/error.log

maxkadel commented 4 months ago

Created a spreadsheet of versions on bibdata machines

maxkadel commented 4 months ago

When we try to preload passenger bundler on production machines, we get this error when running on main:

Cannot checkout session because a spawning error occurred. The identifier of the error is 918286ae. Please see earlier logs for details about the error.
App 1564446 output: /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:259:in `find_spec_for_exe':
App 1564446 output: can't find gem bundler (= 2.5.2) with executable bundle (Gem::GemNotFoundException)
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:239:in `bin_path'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/rubygems_integration.rb:151:in `bin_path'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/shared_helpers.rb:321:in `bundle_bin_path'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/shared_helpers.rb:307:in `set_bundle_variables'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/shared_helpers.rb:76:in `set_bundle_environment'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/runtime.rb:20:in `setup'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler.rb:162:in `setup'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/setup.rb:26:in `block in <top (required)>'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/ui/shell.rb:159:in `with_level'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/ui/shell.rb:111:in `silence'
App 1564446 output:     from /usr/local/lib/ruby/site_ruby/3.1.0/bundler/setup.rb:26:in `<top (required)>'
App 1564446 output:     from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
App 1564446 output:     from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:127:in `require'
maxkadel commented 4 months ago

I think we need to run sudo gem install --default bundle on the production machines, but we'll need to do so sequentially while they're off the load balancer

maxkadel commented 4 months ago

Closed by https://github.com/pulibrary/princeton_ansible/pull/4814