minoppp411
@minoppp411 (林 みのり)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

ローカルでは通るテストがCircleCIでは通らない

解決したいこと

dockerの上にrailsを環境構築しました。docker-compose run web rails test では通るテストがcirclrciではエラーになってしまうので解決したいです。

発生している問題・エラー

#!/bin/bash -eo pipefail
bundle exec rake test
Run options: --seed 33401

# Running:

E

Error:
SampleControllerTest#test_should_get_index:
ActionView::Template::Error: Webpacker can't find application.js in /home/circleci/Minoiro_view/public/packs-test/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
   unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
}

    app/views/layouts/application.html.erb:10
    test/controllers/sample_controller_test.rb:5:in `block in <class:SampleControllerTest>'


rails test test/controllers/sample_controller_test.rb:4



Finished in 1.442930s, 0.6930 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips

Exited with code exit status 1
CircleCI received exit code 1

該当するソースコード

Githubのソースは以下です
https://github.com/Minori411/Minoiro_view

自分で試したこと

$ docker-compose run web rails webpacker:install
$ docker-compose run web rails webpacker:compile

複数の記事を調べwebpackerをコンパイルしてもエラーは解決しませんでした。
よろしくお願いいたします。

0

2Answer

Your answer might help someone💌