前提・実現したいこと
docker-compose upでコンテナを立ち上げたい
発生している問題・エラーメッセージ
symbol not foundや下記のエラーコードをググってもなかなかいい記事を見つけられなかったので質問させていただきます。
docker-compose upコマンドを打つと以下のエラーが出ます。
console
1$ docker-compose up 2Starting 081600ebc6a4_blog_app_1 ... done 3Attaching to 081600ebc6a4_blog_app_1 4081600ebc6a4_blog_app_1 | Traceback (most recent call last): 5081600ebc6a4_blog_app_1 | 46: from bin/rails:4:in `<main>' 6081600ebc6a4_blog_app_1 | 45: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `require' 7081600ebc6a4_blog_app_1 | 44: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:257:in `load_dependency' 8081600ebc6a4_blog_app_1 | 43: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `block in require' 9081600ebc6a4_blog_app_1 | 42: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 10081600ebc6a4_blog_app_1 | 41: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi' 11081600ebc6a4_blog_app_1 | 40: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 12081600ebc6a4_blog_app_1 | 39: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 13081600ebc6a4_blog_app_1 | 38: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 14081600ebc6a4_blog_app_1 | 37: from /usr/local/bundle/gems/railties-5.2.4.1/lib/rails/commands.rb:18:in `<top (required)>' 15081600ebc6a4_blog_app_1 | 36: from /usr/local/bundle/gems/railties-5.2.4.1/lib/rails/command.rb:46:in `invoke' 16081600ebc6a4_blog_app_1 | 35: from /usr/local/bundle/gems/railties-5.2.4.1/lib/rails/command/base.rb:69:in `perform' 17081600ebc6a4_blog_app_1 | 34: from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 18081600ebc6a4_blog_app_1 | 33: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 19081600ebc6a4_blog_app_1 | 32: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 20081600ebc6a4_blog_app_1 | 31: from /usr/local/bundle/gems/railties-5.2.4.1/lib/rails/commands/server/server_command.rb:142:in `perform' 21081600ebc6a4_blog_app_1 | 30: from /usr/local/bundle/gems/railties-5.2.4.1/lib/rails/commands/server/server_command.rb:142:in `tap' 22081600ebc6a4_blog_app_1 | 29: from /usr/local/bundle/gems/railties-5.2.4.1/lib/rails/commands/server/server_command.rb:145:in `block in perform' 23081600ebc6a4_blog_app_1 | 28: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `require' 24081600ebc6a4_blog_app_1 | 27: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:257:in `load_dependency' 25081600ebc6a4_blog_app_1 | 26: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `block in require' 26081600ebc6a4_blog_app_1 | 25: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 27081600ebc6a4_blog_app_1 | 24: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi' 28081600ebc6a4_blog_app_1 | 23: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 29081600ebc6a4_blog_app_1 | 22: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 30081600ebc6a4_blog_app_1 | 21: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 31081600ebc6a4_blog_app_1 | 20: from /app/config/application.rb:7:in `<top (required)>' 32081600ebc6a4_blog_app_1 | 19: from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler.rb:174:in `require' 33081600ebc6a4_blog_app_1 | 18: from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require' 34081600ebc6a4_blog_app_1 | 17: from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each' 35081600ebc6a4_blog_app_1 | 16: from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `block in require' 36081600ebc6a4_blog_app_1 | 15: from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `each' 37081600ebc6a4_blog_app_1 | 14: from /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `block (2 levels) in require' 38081600ebc6a4_blog_app_1 | 13: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 39081600ebc6a4_blog_app_1 | 12: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi' 40081600ebc6a4_blog_app_1 | 11: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 41081600ebc6a4_blog_app_1 | 10: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 42081600ebc6a4_blog_app_1 | 9: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 43081600ebc6a4_blog_app_1 | 8: from /usr/local/bundle/gems/mini_racer-0.2.9/lib/mini_racer.rb:2:in `<top (required)>' 44081600ebc6a4_blog_app_1 | 7: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `require' 45081600ebc6a4_blog_app_1 | 6: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:257:in `load_dependency' 46081600ebc6a4_blog_app_1 | 5: from /usr/local/bundle/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `block in require' 47081600ebc6a4_blog_app_1 | 4: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 48081600ebc6a4_blog_app_1 | 3: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi' 49081600ebc6a4_blog_app_1 | 2: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 50081600ebc6a4_blog_app_1 | 1: from /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 51081600ebc6a4_blog_app_1 | /usr/local/bundle/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require': Error relocating /usr/local/bundle/gems/mini_racer-0.2.9/lib/mini_racer_extension.so: backtrace_symbols: symbol not found - /usr/local/bundle/gems/mini_racer-0.2.9/lib/mini_racer_extension.so (LoadError) 52081600ebc6a4_blog_app_1 | 081600ebc6a4_blog_app_1 exited with code 1 53
Dockerfile
1FROM ruby:2.5.7-alpine3.11 2 3ENV LANG C.UTF-8 \ 4 TZ Asia/Tokyo 5 6ENV BUILD_PACKAGES="build-base" \ 7 DB_PACKAGES="sqlite-dev postgresql-dev" \ 8 RAILS_PACKAGES="tzdata nodejs imagemagick" \ 9 FAVORITE_PACKAGES="less" 10 11RUN apk update && \ 12 apk upgrade && \ 13 apk add git && \ 14 apk --update --no-cache add \ 15 ${BUILD_PACKAGES} \ 16 ${DB_PACKAGES} \ 17 ${RAILS_PACKAGES} \ 18 ${FAVORITE_PACKAGES} 19 20WORKDIR /app 21 22COPY Gemfile \ 23 Gemfile.lock \ 24 /app/ 25 26RUN gem install bundler && bundle install 27 28# 下記のコードは、頻繁に Gemfile を変更する場合、コメントアウトを推奨します。 29# RUN apk del ${BUILD_PACKAGES} 30 31# https://github.com/bundler/bundler/issues/6154 32ENV BUNDLE_GEMFILE='/app/Gemfile'
何か足りない情報があればおっしゃっていただけると幸いです。
###試したこと
Gemfileのmini racerをコメントアウト→docker-compose up
こちらの方法では成功し、アプリケーションサーバーも立ち上がり、localhostで表示もできました。
このことから、やはりmini racer周りで何かが起きてるかと考えられます。
補足情報
ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-darwin18]