質問編集履歴

3

Gemfile.lookを追加しました。

2020/06/01 11:49

投稿

goffee555
goffee555

スコア6

test CHANGED
File without changes
test CHANGED
@@ -198,26 +198,8 @@
198
198
 
199
199
  72: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
200
200
 
201
- 71: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
202
-
203
- 70: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
204
-
205
201
  //中略//
206
202
 
207
- 10: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
208
-
209
- 9: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/pry-0.13.1/lib/pry/syntax_highlighter.rb:3:in `<top (required)>'
210
-
211
- 8: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
212
-
213
- 7: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
214
-
215
- 6: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
216
-
217
- 5: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:27:in `require'
218
-
219
- 4: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:41:in `rescue in require'
220
-
221
203
  3: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
222
204
 
223
205
  2: from /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
@@ -230,12 +212,6 @@
230
212
 
231
213
 
232
214
 
233
-
234
-
235
-
236
-
237
-
238
-
239
215
  ### 試したこと
240
216
 
241
217
 
@@ -291,3 +267,395 @@
291
267
 
292
268
 
293
269
  ```
270
+
271
+ Gemfile.lookが変だと感じたので追記します。
272
+
273
+ ```Gemfilelool
274
+
275
+ GEM
276
+
277
+ remote: https://rubygems.org/
278
+
279
+ specs:
280
+
281
+ actioncable (5.2.4.3)
282
+
283
+ actionpack (= 5.2.4.3)
284
+
285
+ nio4r (~> 2.0)
286
+
287
+ websocket-driver (>= 0.6.1)
288
+
289
+ actionmailer (5.2.4.3)
290
+
291
+ actionpack (= 5.2.4.3)
292
+
293
+ actionview (= 5.2.4.3)
294
+
295
+ activejob (= 5.2.4.3)
296
+
297
+ mail (~> 2.5, >= 2.5.4)
298
+
299
+ rails-dom-testing (~> 2.0)
300
+
301
+ actionpack (5.2.4.3)
302
+
303
+ actionview (= 5.2.4.3)
304
+
305
+ activesupport (= 5.2.4.3)
306
+
307
+ rack (~> 2.0, >= 2.0.8)
308
+
309
+ rack-test (>= 0.6.3)
310
+
311
+ rails-dom-testing (~> 2.0)
312
+
313
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
314
+
315
+ actionview (5.2.4.3)
316
+
317
+ activesupport (= 5.2.4.3)
318
+
319
+ builder (~> 3.1)
320
+
321
+ erubi (~> 1.4)
322
+
323
+ rails-dom-testing (~> 2.0)
324
+
325
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
326
+
327
+ activejob (5.2.4.3)
328
+
329
+ activesupport (= 5.2.4.3)
330
+
331
+ globalid (>= 0.3.6)
332
+
333
+ activemodel (5.2.4.3)
334
+
335
+ activesupport (= 5.2.4.3)
336
+
337
+ activerecord (5.2.4.3)
338
+
339
+ activemodel (= 5.2.4.3)
340
+
341
+ activesupport (= 5.2.4.3)
342
+
343
+ arel (>= 9.0)
344
+
345
+ activestorage (5.2.4.3)
346
+
347
+ actionpack (= 5.2.4.3)
348
+
349
+ activerecord (= 5.2.4.3)
350
+
351
+ marcel (~> 0.3.1)
352
+
353
+ activesupport (5.2.4.3)
354
+
355
+ concurrent-ruby (~> 1.0, >= 1.0.2)
356
+
357
+ i18n (>= 0.7, < 2)
358
+
359
+ minitest (~> 5.1)
360
+
361
+ tzinfo (~> 1.1)
362
+
363
+ addressable (2.7.0)
364
+
365
+ public_suffix (>= 2.0.2, < 5.0)
366
+
367
+ archive-zip (0.12.0)
368
+
369
+ io-like (~> 0.3.0)
370
+
371
+ arel (9.0.0)
372
+
373
+ autoprefixer-rails (9.7.6)
374
+
375
+ execjs
376
+
377
+ bcrypt (3.1.13)
378
+
379
+ bindex (0.8.1)
380
+
381
+ bootsnap (1.4.6)
382
+
383
+ msgpack (~> 1.0)
384
+
385
+ bootstrap-material-design (0.1.4)
386
+
387
+ bootstrap-sass (~> 3.0)
388
+
389
+ bootstrap-sass (3.4.1)
390
+
391
+ autoprefixer-rails (>= 5.2.1)
392
+
393
+ sassc (>= 2.0.0)
394
+
395
+ builder (3.2.4)
396
+
397
+ byebug (11.1.3)
398
+
399
+ capybara (3.32.2)
400
+
401
+ addressable
402
+
403
+ mini_mime (>= 0.1.3)
404
+
405
+ nokogiri (~> 1.8)
406
+
407
+ rack (>= 1.6.0)
408
+
409
+ rack-test (>= 0.6.3)
410
+
411
+ regexp_parser (~> 1.5)
412
+
413
+ xpath (~> 3.2)
414
+
415
+ childprocess (3.0.0)
416
+
417
+ chromedriver-helper (2.1.1)
418
+
419
+ archive-zip (~> 0.10)
420
+
421
+ nokogiri (~> 1.8)
422
+
423
+ coderay (1.1.3)
424
+
425
+ coffee-rails (4.2.2)
426
+
427
+ coffee-script (>= 2.2.0)
428
+
429
+ railties (>= 4.0.0)
430
+
431
+ coffee-script (2.4.1)
432
+
433
+ coffee-script-source
434
+
435
+ execjs
436
+
437
+ coffee-script-source (1.12.2)
438
+
439
+ commonjs (0.2.7)
440
+
441
+ concurrent-ruby (1.1.6)
442
+
443
+ crass (1.0.6)
444
+
445
+ devise (4.7.1)
446
+
447
+ bcrypt (~> 3.0)
448
+
449
+ orm_adapter (~> 0.1)
450
+
451
+ railties (>= 4.1.0)
452
+
453
+ responders
454
+
455
+ warden (~> 1.2.3)
456
+
457
+ erubi (1.9.0)
458
+
459
+ execjs (2.7.0)
460
+
461
+ ffi (1.13.0)
462
+
463
+ font-awesome-rails (4.7.0.5)
464
+
465
+ railties (>= 3.2, < 6.1)
466
+
467
+ globalid (0.4.2)
468
+
469
+ activesupport (>= 4.2.0)
470
+
471
+ i18n (1.8.2)
472
+
473
+ concurrent-ruby (~> 1.0)
474
+
475
+ io-like (0.3.1)
476
+
477
+ jbuilder (2.10.0)
478
+
479
+ activesupport (>= 5.0.0)
480
+
481
+ jquery-rails (4.4.0)
482
+
483
+ rails-dom-testing (>= 1, < 3)
484
+
485
+ railties (>= 4.2.0)
486
+
487
+ thor (>= 0.14, < 2.0)
488
+
489
+ kaminari (1.2.1)
490
+
491
+ activesupport (>= 4.1.0)
492
+
493
+ kaminari-actionview (= 1.2.1)
494
+
495
+ kaminari-activerecord (= 1.2.1)
496
+
497
+ kaminari-core (= 1.2.1)
498
+
499
+ kaminari-actionview (1.2.1)
500
+
501
+ actionview
502
+
503
+ kaminari-core (= 1.2.1)
504
+
505
+ kaminari-activerecord (1.2.1)
506
+
507
+ activerecord
508
+
509
+ kaminari-core (= 1.2.1)
510
+
511
+ kaminari-core (1.2.1)
512
+
513
+ less (2.6.0)
514
+
515
+ commonjs (~> 0.2.7)
516
+
517
+ less-rails (2.8.0)
518
+
519
+ actionpack (>= 4.0)
520
+
521
+ less (~> 2.6.0)
522
+
523
+ sprockets (> 2, < 4)
524
+
525
+ tilt
526
+
527
+ libv8 (3.16.14.19)
528
+
529
+ listen (3.1.5)
530
+
531
+ rb-fsevent (~> 0.9, >= 0.9.4)
532
+
533
+ rb-inotify (~> 0.9, >= 0.9.7)
534
+
535
+ ruby_dep (~> 1.2)
536
+
537
+ loofah (2.5.0)
538
+
539
+ crass (~> 1.0.2)
540
+
541
+ nokogiri (>= 1.5.9)
542
+
543
+
544
+
545
+ //文字制限のため一部省略//
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+ execjs (>= 0.3.0, < 3)
554
+
555
+ warden (1.2.8)
556
+
557
+ rack (>= 2.0.6)
558
+
559
+ web-console (3.7.0)
560
+
561
+ actionview (>= 5.0)
562
+
563
+ activemodel (>= 5.0)
564
+
565
+ bindex (>= 0.4.0)
566
+
567
+ railties (>= 5.0)
568
+
569
+ websocket-driver (0.7.2)
570
+
571
+ websocket-extensions (>= 0.1.0)
572
+
573
+ websocket-extensions (0.1.4)
574
+
575
+ xpath (3.2.0)
576
+
577
+ nokogiri (~> 1.8)
578
+
579
+
580
+
581
+ PLATFORMS
582
+
583
+ ruby
584
+
585
+
586
+
587
+ DEPENDENCIES
588
+
589
+ bootsnap (>= 1.1.0)
590
+
591
+ bootstrap-material-design (= 0.1.4)
592
+
593
+ byebug
594
+
595
+ capybara (>= 2.15)
596
+
597
+ chromedriver-helper
598
+
599
+ coderay
600
+
601
+ coffee-rails (~> 4.2)
602
+
603
+ devise
604
+
605
+ font-awesome-rails
606
+
607
+ jbuilder (~> 2.5)
608
+
609
+ jquery-rails
610
+
611
+ kaminari
612
+
613
+ listen (>= 3.0.5, < 3.2)
614
+
615
+ mini_magick
616
+
617
+ mysql2 (>= 0.4.4, < 0.6.0)
618
+
619
+ pry-rails
620
+
621
+ puma (~> 3.11)
622
+
623
+ rails (~> 5.2.1)
624
+
625
+ redcarpet
626
+
627
+ sass-rails (~> 5.0)
628
+
629
+ selenium-webdriver
630
+
631
+ spring
632
+
633
+ spring-watcher-listen (~> 2.0.0)
634
+
635
+ therubyracer
636
+
637
+ turbolinks (~> 5)
638
+
639
+ twitter-bootstrap-rails
640
+
641
+ tzinfo-data
642
+
643
+ uglifier (>= 1.3.0)
644
+
645
+ web-console (>= 3.3.0)
646
+
647
+
648
+
649
+ RUBY VERSION
650
+
651
+ ruby 2.5.1p57
652
+
653
+
654
+
655
+ BUNDLED WITH
656
+
657
+ 2.1.4
658
+
659
+
660
+
661
+ ```

2

gem list の実行結果を追記

2020/06/01 11:49

投稿

goffee555
goffee555

スコア6

test CHANGED
File without changes
test CHANGED
@@ -261,3 +261,33 @@
261
261
 
262
262
 
263
263
  よろしくお願いいたします。
264
+
265
+
266
+
267
+ ###追記
268
+
269
+ coderayのファイルが見つからないためエラーがでたと推測し、下記実行
270
+
271
+ ```terminal
272
+
273
+ ec2-user:~/environment/bestcamp (master) $ gem list coderay
274
+
275
+
276
+
277
+ *** LOCAL GEMS ***
278
+
279
+
280
+
281
+ coderay (default: 1.1.3, 1.1.2)
282
+
283
+ ec2-user:~/environment/bestcamp (master) $ sudo gem list coderay
284
+
285
+
286
+
287
+ *** LOCAL GEMS ***
288
+
289
+
290
+
291
+
292
+
293
+ ```

1

rails newとGemfileの内容を追加しました。

2020/05/31 22:31

投稿

goffee555
goffee555

スコア6

test CHANGED
File without changes
test CHANGED
@@ -14,8 +14,166 @@
14
14
 
15
15
  新たにRailsアプリケーションを作成するためにファイルを作成。
16
16
 
17
+ ```terminal
18
+
19
+ rails _5.2.1_ new bestcamp -d mysql
20
+
21
+ ```
22
+
17
23
  GemfileにGemを追加、bundle updateを実行。
18
24
 
25
+ ```Gemfile
26
+
27
+ source 'https://rubygems.org'
28
+
29
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
30
+
31
+
32
+
33
+ ruby '2.5.1'
34
+
35
+
36
+
37
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
38
+
39
+ gem 'rails', '~> 5.2.1'
40
+
41
+ # Use mysql as the database for Active Record
42
+
43
+ gem 'mysql2', '>= 0.4.4', '< 0.6.0'
44
+
45
+ # Use Puma as the app server
46
+
47
+ gem 'puma', '~> 3.11'
48
+
49
+ # Use SCSS for stylesheets
50
+
51
+ gem 'sass-rails', '~> 5.0'
52
+
53
+ # Use Uglifier as compressor for JavaScript assets
54
+
55
+ gem 'uglifier', '>= 1.3.0'
56
+
57
+ # See https://github.com/rails/execjs#readme for more supported runtimes
58
+
59
+ # gem 'mini_racer', platforms: :ruby
60
+
61
+
62
+
63
+ # Use CoffeeScript for .coffee assets and views
64
+
65
+ gem 'coffee-rails', '~> 4.2'
66
+
67
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
68
+
69
+ gem 'turbolinks', '~> 5'
70
+
71
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
72
+
73
+ gem 'jbuilder', '~> 2.5'
74
+
75
+ # Use Redis adapter to run Action Cable in production
76
+
77
+ # gem 'redis', '~> 4.0'
78
+
79
+ # Use ActiveModel has_secure_password
80
+
81
+ # gem 'bcrypt', '~> 3.1.7'
82
+
83
+
84
+
85
+ # Use ActiveStorage variant
86
+
87
+ # gem 'mini_magick', '~> 4.8'
88
+
89
+
90
+
91
+ # Use Capistrano for deployment
92
+
93
+ # gem 'capistrano-rails', group: :development
94
+
95
+
96
+
97
+ # Reduces boot times through caching; required in config/boot.rb
98
+
99
+ gem 'bootsnap', '>= 1.1.0', require: false
100
+
101
+
102
+
103
+ group :development, :test do
104
+
105
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
106
+
107
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
108
+
109
+ end
110
+
111
+
112
+
113
+ group :development do
114
+
115
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
116
+
117
+ gem 'web-console', '>= 3.3.0'
118
+
119
+ gem 'listen', '>= 3.0.5', '< 3.2'
120
+
121
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
122
+
123
+ gem 'spring'
124
+
125
+ gem 'spring-watcher-listen', '~> 2.0.0'
126
+
127
+ end
128
+
129
+
130
+
131
+ group :test do
132
+
133
+ # Adds support for Capybara system testing and selenium driver
134
+
135
+ gem 'capybara', '>= 2.15'
136
+
137
+ gem 'selenium-webdriver'
138
+
139
+ # Easy installation and use of chromedriver to run system tests with Chrome
140
+
141
+ gem 'chromedriver-helper'
142
+
143
+ end
144
+
145
+
146
+
147
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
148
+
149
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
150
+
151
+ #以下、追加
152
+
153
+ gem 'pry-rails'
154
+
155
+ gem 'devise'
156
+
157
+ gem 'therubyracer'
158
+
159
+ gem 'twitter-bootstrap-rails'
160
+
161
+ gem 'bootstrap-material-design', '0.1.4'
162
+
163
+ gem 'jquery-rails'
164
+
165
+ gem "font-awesome-rails"
166
+
167
+ gem 'mini_magick'
168
+
169
+ gem 'kaminari'
170
+
171
+ gem 'redcarpet'
172
+
173
+ gem 'coderay'
174
+
175
+ ```
176
+
19
177
  その後、rails sでサーバーを起動させると以下のエラーが発生。
20
178
 
21
179