rails / marcel

Find the mime type of files, examining file, filename and declared type
Apache License 2.0
386 stars 67 forks source link

Installation of Marcel v1.0.0 breaks with "cannot load such file -- mimemagic/overlay (LoadError)" #33

Closed pedrofurtado closed 3 years ago

pedrofurtado commented 3 years ago

After upgrade Rails from 6.1.3 to 6.1.3.1, the application not load, throwing a error like this one below:

cannot load such file -- mimemagic/overlay (LoadError)
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `block in require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:299:in `load_dependency'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/carrierwave-2.2.0/lib/carrierwave/sanitized_file.rb:5:in `<main>'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `block in require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:299:in `load_dependency'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/activesupport-6.1.3.1/lib/active_support/dependencies.rb:332:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/carrierwave-2.2.0/lib/carrierwave.rb:99:in `<main>'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bootsnap-1.7.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `each'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `block in require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `each'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `require'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/bundler-2.2.15/lib/bundler.rb:173:in `require'
  /vagrant/config/application.rb:11:in `<top (required)>'
  /vagrant/config/environment.rb:3:in `require_relative'
  /vagrant/config/environment.rb:3:in `<top (required)>'
  config.ru:3:in `require_relative'
  config.ru:3:in `block in <main>'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/rack-2.2.3/lib/rack/builder.rb:125:in `instance_eval'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/rack-2.2.3/lib/rack/builder.rb:125:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/passenger-6.0.7/src/helper-scripts/rack-preloader.rb:101:in `eval'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/passenger-6.0.7/src/helper-scripts/rack-preloader.rb:101:in `preload_app'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/passenger-6.0.7/src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/passenger-6.0.7/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:382:in `run_block_and_record_step_progress'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/passenger-6.0.7/src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/passenger-6.0.7/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/local/rvm/gems/ruby-3.0.0@social/gems/passenger-6.0.7/src/helper-scripts/rack-preloader.rb:29:in `<main>'

I've posted the entire stack strace, for better understanding. Maybe this can be related to recent license changes in mimemagic, right?

Related links: https://stackoverflow.com/q/66837647

Thanks a lot! 🤝 🍻

pedrofurtado commented 3 years ago

Sorry, this bug is related to Carrierwave 🙈 I made confusion here

choznerol commented 3 years ago

For those who first see this error after update rails like me and OP, carrierwave 2.2.1 was just released on 3 March and it can fix the LoadError.

https://github.com/carrierwaveuploader/carrierwave/releases/tag/v2.2.1 https://stackoverflow.com/a/41452164/6739302