質問編集履歴

3

ご指摘頂きました内容修正

2019/07/26 08:31

投稿

naoki10
naoki10

スコア37

test CHANGED
File without changes
test CHANGED
@@ -313,3 +313,155 @@
313
313
  gemのインストールは下記のように実施しています。
314
314
 
315
315
  bundle install --path vendor/bundle
316
+
317
+
318
+
319
+ ### 試したこと
320
+
321
+
322
+
323
+ ```
324
+
325
+ version: 2
326
+
327
+
328
+
329
+ jobs:
330
+
331
+ test:
332
+
333
+ docker:
334
+
335
+ - image: circleci/ruby:2.4.5-node-browsers
336
+
337
+ environment:
338
+
339
+ RAILS_ENV: test
340
+
341
+ BUNDLE_PATH: "vendor/bundle"
342
+
343
+ BUNDLER_VERSION: 2.0.2
344
+
345
+ - image: circleci/mysql:5.6
346
+
347
+ environment:
348
+
349
+ MYSQL_ALLOW_EMPTY_PASSWORD: true
350
+
351
+ MYSQL_ROOT_PASSWORD: ''
352
+
353
+ MYSQL_DATABASE: circleruby_test_test
354
+
355
+ working_directory: ~/repo
356
+
357
+ steps:
358
+
359
+ - checkout
360
+
361
+ - run:
362
+
363
+ name: bundle のセットアップ
364
+
365
+ command: |
366
+
367
+ sudo gem update --system
368
+
369
+ sudo gem uninstall bundler
370
+
371
+ sudo rm /usr/local/bin/bundle
372
+
373
+ #sudo rm /usr/local/bin/bundler
374
+
375
+ sudo gem install bundler
376
+
377
+ - restore_cache:
378
+
379
+ keys:
380
+
381
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
382
+
383
+ # fallback to using the latest cache if no exact match is found
384
+
385
+ - v1-dependencies-
386
+
387
+ - run:
388
+
389
+ name: install bundle
390
+
391
+ command: |
392
+
393
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
394
+
395
+ - save_cache:
396
+
397
+ paths:
398
+
399
+ - ./vendor/bundle
400
+
401
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
402
+
403
+ - run:
404
+
405
+ name: データベースの起動を待機
406
+
407
+ command: dockerize -wait tcp://127.0.0.1:3306 -timeout 1m
408
+
409
+ - run:
410
+
411
+ name: データベースのセットアップ
412
+
413
+ command: bundle exec rake db:schema:load
414
+
415
+ - run:
416
+
417
+ name: gem install bundler
418
+
419
+ command: gem install bundler
420
+
421
+ - run:
422
+
423
+ name: rspecを実行
424
+
425
+ command: bundle exec rspec
426
+
427
+
428
+
429
+ code-check:
430
+
431
+ docker:
432
+
433
+ - image: circleci/ruby:2.4.5-node-browsers
434
+
435
+ working_directory: ~/repo
436
+
437
+ steps:
438
+
439
+ - checkout
440
+
441
+ - run:
442
+
443
+ name: bundle install
444
+
445
+ command: bundle install
446
+
447
+ - run:
448
+
449
+ name: rubocopを実行
450
+
451
+ command: bundle exec rubocop
452
+
453
+
454
+
455
+ workflows:
456
+
457
+ version: 2
458
+
459
+ workflows:
460
+
461
+ jobs:
462
+
463
+ - test
464
+
465
+ - code-check
466
+
467
+ ```

2

タグ不足

2019/07/26 08:31

投稿

naoki10
naoki10

スコア37

test CHANGED
@@ -1 +1 @@
1
- Rails CircleCI bundler: command not found:
1
+ Rails CircleCI Docker bundler: command not found:
test CHANGED
File without changes

1

誤字

2019/07/26 06:04

投稿

naoki10
naoki10

スコア37

test CHANGED
@@ -1 +1 @@
1
- Rails CirclCI bundler: command not found:
1
+ Rails CircleCI bundler: command not found:
test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  GitHubへPUSH時に、
6
6
 
7
- Rails と CirclCI で RspecやRubocop を実行したい。
7
+ Rails と CircleCI で RspecやRubocop を実行したい。
8
8
 
9
9
  しかし下記エラーが発生します。
10
10