Upgrade 2.5.0 - Error at post-deployment DB migrations


#1

Hi all,

I’m attempting to update my instance to 2.5.0 following the instructions on the GitHub releases page.

Everything seemed to go without any problems but I am now at the last step, running the post-deployment database migrations, and I encounter an error which I have supplied below.

Any advice on how to fix this?

Thanks,
Dave

mastodon@scicomm.xyz:~/live$ RAILS_ENV=production bundle exec rails db:migrate --trace
rails aborted!
LoadError: libicuuc.so.55: cannot open shared object file: No such file or directory - /home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/charlock_holmes-0.7.6/lib/charlock_holmes/charlock_holmes.so
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/charlock_holmes-0.7.6/lib/charlock_holmes.rb:1:in `<top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71:in `block in require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:70:in `require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:79:in `require'
/home/mastodon/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/mastodon/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:76:in `each'
/home/mastodon/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:76:in `block in require'
/home/mastodon/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:65:in `each'
/home/mastodon/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:65:in `require'
/home/mastodon/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.4/lib/bundler.rb:114:in `require'
/home/mastodon/live/config/application.rb:7:in `<top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
/home/mastodon/live/Rakefile:4:in `<top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `block in load'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:281:in `load'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/command.rb:48:in `invoke'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
/home/mastodon/live/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
bin/rails:4:in `<main>'

#2

So I have no idea what I did but I seem to have managed to complete the upgrade to 2.5.0, in spite of all the errors: a ‘bundle prisitine’ made the charlock_holmes error go away but then introduced a similar problem with http_parser. It turns out this was a 403 error downloading it from amazon s3. This brought more problems but somehow I came out of it with a functional instance again after a few hours of rolling changes backwards and forwards.


#3

Can you check if you have ICU libraries installed? Also check the exact ICU version number (both ICU and the shared library). If it’s different than 55 you might be in trouble. Rebuilding the charlock_holmes gem might help or installing a different ICU version.

My old ruby 2.4 installation has this:

$ ldd /usr/local/lib/ruby/gems/2.4/extensions/amd64-freebsd-10/2.4/charlock_holmes-0.7.5/charlock_holmes/charlock_holmes.so
/usr/local/lib/ruby/gems/2.4/extensions/amd64-freebsd-10/2.4/charlock_holmes-0.7.5/charlock_holmes/charlock_holmes.so:
	libruby24.so.24 => /usr/local/lib/libruby24.so.24 (0x801800000)
	libicudata.so.60 => /usr/local/lib/libicudata.so.60 (0x801cab000)
	libicuuc.so.60 => /usr/local/lib/libicuuc.so.60 (0x801eac000)
	libz.so.6 => /lib/libz.so.6 (0x80226d000)
	libicui18n.so.60 => /usr/local/lib/libicui18n.so.60 (0x802600000)
	libunwind.so.8 => /usr/local/lib/libunwind.so.8 (0x802ace000)
	libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x802ce8000)
	libprocstat.so.1 => /usr/lib/libprocstat.so.1 (0x802eeb000)
	libthr.so.3 => /lib/libthr.so.3 (0x8030f5000)
	libcrypt.so.5 => /lib/libcrypt.so.5 (0x803319000)
	libm.so.5 => /lib/libm.so.5 (0x803536000)
	libc.so.7 => /lib/libc.so.7 (0x800822000)
	libc++.so.1 => /usr/lib/libc++.so.1 (0x80375f000)
	libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x803a1f000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x803c3c000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x803e4a000)
	libelf.so.1 => /usr/lib/libelf.so.1 (0x804073000)
	libkvm.so.6 => /lib/libkvm.so.6 (0x804288000)
	libutil.so.9 => /lib/libutil.so.9 (0x804491000)

$ pkg which /usr/local/lib/ruby/gems/2.4/extensions/amd64-freebsd-10/2.4/charlock_holmes-0.7.5/charlock_holmes/charlock_holmes.so
/usr/local/lib/ruby/gems/2.4/extensions/amd64-freebsd-10/2.4/charlock_holmes-0.7.5/charlock_holmes/charlock_holmes.so was installed by package rubygem-charlock_holmes-0.7.5_1
$ pkg which /usr/local/lib/libicuuc.so.60
/usr/local/lib/libicuuc.so.60 was installed by package icu-60.2_2,1

So in my case (this is FreeBSD with Ruby 2.4 and a very old Mastodon code) I need ICU 60 libraries.

Your gem is looking for ICU 55 ones.