github actionsのみ以下のエラーが出てしまう
Run bundle config path /home/runner/work/dqx/dqx/vendor/bundle bundle config path /home/runner/work/dqx/dqx/vendor/bundle #bundle exec rails db:schema:load --trace #bundle exec rails db:create --trace #bundle exec rails db:migrate --trace bundle exec rails db:setup RAILS_ENV=test shell: /usr/bin/bash -e {0} env: cache-version: v5 RAILS_ENV: test DATABASE_URL: ***localhost:5432/dqx_test Your application has set path to "/home/runner/work/dqx/dqx/vendor/bundle". This will override the global value you are currently setting rails aborted! NameError: uninitialized constant Devise /home/runner/work/dqx/dqx/config/initializers/devise.rb:11:in `<main>' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/engine.rb:666:in `block in load_config_initializer' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.4/lib/active_support/notifications.rb:182:in `instrument' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/engine.rb:665:in `load_config_initializer' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/engine.rb:624:in `each' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/engine.rb:624:in `block in <class:Engine>' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/initializable.rb:32:in `instance_exec' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/initializable.rb:32:in `run' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/initializable.rb:61:in `block in run_initializers' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/initializable.rb:50:in `each' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/initializable.rb:50:in `tsort_each_child' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/initializable.rb:60:in `run_initializers' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/application.rb:363:in `initialize!' /home/runner/work/dqx/dqx/config/environment.rb:5:in `<main>' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7 .5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/application.rb:339:in `require_environment!' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/application.rb:523:in `block in run_tasks_blocks' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/commands/rake/rake_command.rb:23:in `block in perform' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/commands/rake/rake_command.rb:20:in `perform' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/command.rb:48:in `invoke' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/railties-6.0.4/lib/rails/commands.rb:18:in `<main>' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' /home/runner/work/dqx/dqx/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' bin/rails:4:in `<main>' Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create => db:load_config => environment (See full trace by running task with --trace) Error: Process completed with exit code 1.
概要
Rails6とdockerの環境です。
今まで問題なく通っていたgithub actionsが通らなくなり、調査方法もわからないためご教示いただきたいです。
今回追加したことはdevise gemを追加してsetupをしました。
必要な情報があれば教えてください。
rails.yaml
1name: rails 2 3on: 4 push: 5 branches: [ main, develop ] 6 pull_request: 7 branches: [ main, develop ] 8 9env: 10 cache-version: v2 11 12jobs: 13 test: 14 runs-on: ubuntu-latest 15 services: 16 postgres: 17 image: postgres:12 18 env: 19 POSTGRES_USER: xxxxxx 20 POSTGRES_PASSWORD: xxxxx 21 POSTGRES_DB: dqx_test 22 options: >- 23 --health-cmd pg_isready 24 --health-interval 10s 25 --health-timeout 5s 26 --health-retries 5 27 ports: 28 - 5432:5432 29 steps: 30 - uses: actions/checkout@v1 31 32 - name: Set up Ruby 33 uses: ruby/setup-ruby@v1 34 with: 35 ruby-version: 2.7.1 36 bundler-cache: true 37 38 - name: Cache gems 39 uses: actions/cache@preview 40 with: 41 path: ./ 42 key: bundle-${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} 43 restore-keys: | 44 bundle-${{ runner.os }}-gem- 45 - name: Set up Node 12.18.4 46 uses: actions/setup-node@v1 47 with: 48 node-version: 12.18.4 49 50 - name: Cache node modules 51 uses: actions/cache@preview 52 with: 53 path: ./ 54 key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} 55 restore-keys: | 56 ${{ runner.os }}-node- 57 - name: Install dependencies 58 run: | 59 gem install bundler 60 bundle install -j4 61 yarn install 62 - name: setup DB 63 env: 64 RAILS_ENV: test 65 DATABASE_URL: postgres://postgres:xxxxxx@localhost:5432/dqx_test 66 run: | 67 bundle exec rails db:schema:load 68 - name: Run tests 69 env: 70 RAILS_ENV: test 71 DATABASE_URL: postgres://postgres:password@localhost:5432/dqx_test 72 run: | 73 bundle exec rails db:migrate RAILS_ENV=test 74 bundle exec rspec 75 - name: Simplecov Report 76 uses: aki77/simplecov-report-action@v1 77 with: 78 failedThreshold: 1 79 token: ${{ secrets.GITHUB_TOKEN }}
あなたの回答
tips
プレビュー