質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Circle CI

Circle CIは、クラウド上に簡単にCI環境を構築できるWebサービスです。GitHubと連携させ、CIしたいリポジトリーを選択しビルド・テストを行います。チャット等を利用して結果を確認することが可能です。

Q&A

0回答

611閲覧

rails rakeコマンド実行時のエラー libicudata.so.63: cannot open shared object file

k.nakazono

総合スコア4

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Circle CI

Circle CIは、クラウド上に簡単にCI環境を構築できるWebサービスです。GitHubと連携させ、CIしたいリポジトリーを選択しビルド・テストを行います。チャット等を利用して結果を確認することが可能です。

0グッド

0クリップ

投稿2022/05/19 06:20

編集2022/05/19 06:55

ruby2.7.2 -> 2.7.6のバージョンアップに伴い、CircleCIの実行環境も次世代のimageを使用するようにしました。
すると Database setup のrunコマンドでエラーが発生してしまい。どのように調査・解決すればよいか八方塞がりになり投稿させて頂きました。

原因の切り分けや、どのように対応すすめるのがよいかヒントを頂けると大変助かります。

下記はCircleCIのconfig.ymlの中身と修正内容です。docker image を circleci/ruby:2.7.2-node-browsers -> cimg/ruby:2.7.6-browsers に変えています。

circleci/config.yml

1# Ruby CircleCI 2.0 configuration file 2# 3# Check https://circleci.com/docs/2.0/language-ruby/ for more details 4# 5version: 2 6jobs: 7 build: 8 docker: 9# - image: circleci/ruby:2.7.2-node-browsers <- この部分を修正 10 - image: cimg/ruby:2.7.6-browsers 11 environment: 12 PGHOST: localhost 13 PGUSER: postgres 14 RAILS_ENV: test 15 TZ: /usr/share/zoneinfo/Asia/Tokyo 16 PARALLEL_TESTS_CONCURRENCY: 2 17 - image: redis:3.2.11 18 - image: postgres:10.4 19 environment: 20 POSTGRES_USER: postgres 21 POSTGRES_PASSWORD: "" 22 POSTGRES_DB: db_test 23 BUNDLER_VERSION: 2.3.11 24 parallelism: 2 25 26 working_directory: ~/repo 27 28 steps: 29 - checkout 30 31 # Download and cache dependencies 32 - restore_cache: 33 keys: 34 - v1-dependencies-{{ checksum "Gemfile.lock" }} 35 # fallback to using the latest cache if no exact match is found 36 - v1-dependencies- 37 - bootsnap-cache-{{ .Branch }}-{{ .Revision }} 38 - bootsnap-cache-{{ .Branch }} 39 - bootsnap-cache 40 41 - run: 42 name: setup bundler 43 command: | 44 gem update --system 45 gem install bundler -v 2.3.11 46 47 - run: 48 name: install dependencies 49 command: | 50 bundle install --jobs=4 --retry=3 --path vendor/bundle 51 52 - save_cache: 53 paths: 54 - ./vendor/bundle 55 key: v1-dependencies-{{ checksum "Gemfile.lock" }} 56 - save_cache: 57 key: bootsnap-cache-{{ .Branch }}-{{ .Revision }} 58 paths: 59 - tmp/cache/bootsnap-load-path-cache 60 - tmp/cache/bootsnap-compile-cache 61 - save_cache: 62 key: bootsnap-cache-{{ .Branch }} 63 paths: 64 - tmp/cache/bootsnap-load-path-cache 65 - tmp/cache/bootsnap-compile-cache 66 - save_cache: 67 key: bootsnap-cache 68 paths: 69 - tmp/cache/bootsnap-load-path-cache 70 - tmp/cache/bootsnap-compile-cache 71 72 # Database setup 73 - run: 74 name: Database setup 75 command: | 76 bundle exec rake db:migrate RAILS_ENV=test 77 bundle exec rake parallel:create[$PARALLEL_TESTS_CONCURRENCY] 78 bundle exec rake parallel:migrate[$PARALLEL_TESTS_CONCURRENCY] 79 80 # run tests! 81 - run: 82 name: Run rspec in parallel 83 command: | 84 mkdir /tmp/test-results 85 bundle exec parallel_rspec -n $PARALLEL_TESTS_CONCURRENCY $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) 86 87 # collect reports 88 - store_test_results: 89 path: /tmp/test-results 90 - store_artifacts: 91 path: /tmp/test-results 92 destination: test-results

CircleCIで出力されるエラーです

#!/bin/bash -eo pipefail bundle exec rake db:migrate RAILS_ENV=test bundle exec rake parallel:create[$PARALLEL_TESTS_CONCURRENCY] bundle exec rake parallel:migrate[$PARALLEL_TESTS_CONCURRENCY] rake aborted! LoadError: libicudata.so.63: cannot open shared object file: No such file or directory - /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes/charlock_holmes.so /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/charlock_holmes-0.7.7/lib/charlock_holmes.rb:1:in `<main>' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/runtime.rb:60:in `block (2 levels) in require' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/runtime.rb:55:in `each' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/runtime.rb:55:in `block in require' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/runtime.rb:44:in `each' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/runtime.rb:44:in `require' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler.rb:176:in `require' /home/circleci/repo/config/application.rb:18:in `<top (required)>' /home/circleci/repo/Rakefile:4:in `require_relative' /home/circleci/repo/Rakefile:4:in `<top (required)>' /home/circleci/repo/vendor/bundle/ruby/2.7.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `load' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:58:in `kernel_load' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/cli/exec.rb:23:in `run' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/cli.rb:483:in `exec' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/cli.rb:31:in `dispatch' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/cli.rb:25:in `start' /home/circleci/.rubygems/gems/bundler-2.3.11/exe/bundle:48:in `block in <top (required)>' /home/circleci/.rubygems/gems/bundler-2.3.11/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors' /home/circleci/.rubygems/gems/bundler-2.3.11/exe/bundle:36:in `<top (required)>' /home/circleci/.rubygems/bin/bundle:25:in `load' /home/circleci/.rubygems/bin/bundle:25:in `<main>' (See full trace by running task with --trace) Exited with code exit status 1 CircleCI received exit code 1

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問