質問編集履歴

2

修正したソースコードを追加

2020/08/24 10:49

投稿

mikepp
mikepp

スコア11

test CHANGED
File without changes
test CHANGED
@@ -415,3 +415,113 @@
415
415
  ```
416
416
 
417
417
  このエラーメッセージから[この記事](https://qiita.com/tanakaworld/items/e15ff9dbdd4b628378c2)を参考に、bundlerのバージョンを指定する方法を実装。
418
+
419
+
420
+
421
+ # 追記2
422
+
423
+ ## 修正したソースコード .config/config.yml
424
+
425
+
426
+
427
+ ```
428
+
429
+ version: 2.1
430
+
431
+
432
+
433
+ orbs:
434
+
435
+ ruby: circleci/ruby@1.1.0
436
+
437
+
438
+
439
+ jobs:
440
+
441
+ build:
442
+
443
+ docker:
444
+
445
+ - image: circleci/ruby:2.5.1-node-browsers
446
+
447
+ environment:
448
+
449
+ BUNDLER_VERSION: 2.1.4 #修正箇所
450
+
451
+ steps:
452
+
453
+ - checkout
454
+
455
+ - ruby/install-deps
456
+
457
+
458
+
459
+ test:
460
+
461
+ parallelism: 3
462
+
463
+ docker:
464
+
465
+ - image: circleci/ruby:2.5.1-node-browsers
466
+
467
+ environment:
468
+
469
+ DB_HOST: 127.0.0.1
470
+
471
+ RAILS_ENV: test
472
+
473
+ BUNDLER_VERSION: 2.1.4
474
+
475
+ - image: circleci/mysql:8.0
476
+
477
+ command: --default-authentication-plugin=mysql_native_password
478
+
479
+ environment:
480
+
481
+ MYSQL_USER: yuki
482
+
483
+ MYSQL_DB: golfour_test
484
+
485
+ steps:
486
+
487
+ - checkout
488
+
489
+ - ruby/install-deps
490
+
491
+ - run:
492
+
493
+ name: Wait for DB
494
+
495
+ command: dockerize -wait tcp://localhost:3306 -timeout 1m
496
+
497
+ - run:
498
+
499
+ name: Database setup
500
+
501
+ command: bundle exec rails db:schema:load --trace
502
+
503
+ # Run rspec in parallel
504
+
505
+ - ruby/rspec-test
506
+
507
+ - ruby/rubocop-check
508
+
509
+
510
+
511
+ workflows:
512
+
513
+ version: 2
514
+
515
+ build_and_test:
516
+
517
+ jobs:
518
+
519
+ - build
520
+
521
+ - test:
522
+
523
+ requires:
524
+
525
+ - build
526
+
527
+ ```

1

エラーコードを追加

2020/08/24 10:49

投稿

mikepp
mikepp

スコア11

test CHANGED
File without changes
test CHANGED
@@ -371,3 +371,47 @@
371
371
  ADD . /workdir
372
372
 
373
373
  ```
374
+
375
+
376
+
377
+
378
+
379
+ # 追記
380
+
381
+ ## 最初に発生したエラーメッセージ
382
+
383
+
384
+
385
+ ```console
386
+
387
+ ~@yk golfour_aws % circleci local execute
388
+
389
+ ・・・
390
+
391
+ Gemfile.lock is bundled with bundler version 2.1.4
392
+
393
+ Installing bundler 2.1.4
394
+
395
+ Fetching: bundler-2.1.4.gem (100%)
396
+
397
+ Successfully installed bundler-2.1.4
398
+
399
+ 1 gem installed
400
+
401
+ /bin/bash: line 21: ./vendor/bundle: No such file or directory
402
+
403
+ You must use Bundler 2 or greater with this lockfile.
404
+
405
+ You must use Bundler 2 or greater with this lockfile.
406
+
407
+ Error:
408
+
409
+ Exited with code exit status 20
410
+
411
+
412
+
413
+ Step failed
414
+
415
+ ```
416
+
417
+ このエラーメッセージから[この記事](https://qiita.com/tanakaworld/items/e15ff9dbdd4b628378c2)を参考に、bundlerのバージョンを指定する方法を実装。