sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.23k stars 571 forks source link

Docker image unable to locate sqlite3 gem #559

Closed coder2000 closed 1 month ago

coder2000 commented 1 month ago

Starting an instance of the 0.10 docker image gives the following errors:

mail-1    | Starting MailCatcher v0.10.0
mail-1    | <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/sqlite3-1.7.3-x86_64-linux/lib/sqlite3.rb:6:in `rescue in <top (required)>'
mail-1    |     from /usr/local/bundle/gems/sqlite3-1.7.3-x86_64-linux/lib/sqlite3.rb:2:in `<top (required)>'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher/mail.rb:6:in `<top (required)>'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:239:in `rescue_port'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:182:in `block in run!'
mail-1    |     from /usr/local/bundle/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
mail-1    |     from /usr/local/bundle/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:180:in `run!'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/bin/mailcatcher:6:in `<top (required)>'
mail-1    |     from /usr/local/bundle/bin/mailcatcher:25:in `load'
mail-1    |     from /usr/local/bundle/bin/mailcatcher:25:in `<main>'
mail-1    | <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': Error relocating /usr/local/bundle/gems/sqlite3-1.7.3-x86_64-linux/lib/sqlite3/3.3/sqlite3_native.so: posix_fallocate64: symbol not found - /usr/local/bundle/gems/sqlite3-1.7.3-x86_64-linux/lib/sqlite3/3.3/sqlite3_native.so (LoadError)
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/sqlite3-1.7.3-x86_64-linux/lib/sqlite3.rb:4:in `<top (required)>'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher/mail.rb:6:in `<top (required)>'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher/smtp.rb:5:in `<top (required)>'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:183:in `block (2 levels) in run!'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:239:in `rescue_port'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:182:in `block in run!'
mail-1    |     from /usr/local/bundle/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
mail-1    |     from /usr/local/bundle/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/lib/mail_catcher.rb:180:in `run!'
mail-1    |     from /usr/local/bundle/gems/mailcatcher-0.10.0/bin/mailcatcher:6:in `<top (required)>'
mail-1    |     from /usr/local/bundle/bin/mailcatcher:25:in `load'
mail-1    |     from /usr/local/bundle/bin/mailcatcher:25:in `<main>'
mail-1 exited with code 1
AlexeyDemidov commented 1 month ago

Workarounds: Use FROM ruby:3.3-alpine3.18 or remove condition [ "$(uname -m)" != "aarch64" ] from gem install sqlite3 .

sj26 commented 1 month ago

Ah, bugger.

remove condition [ "$(uname -m)" != "aarch64" ] from gem install sqlite3

I think this works. I've just pushed a new image. Please give it a go, and reopen if you're still having issues.