質問編集履歴

2

編集・追記依頼の対応

2021/03/24 08:54

投稿

H1geD1cky
H1geD1cky

スコア0

test CHANGED
File without changes
test CHANGED
@@ -176,7 +176,229 @@
176
176
 
177
177
 
178
178
 
179
-
179
+ Traceback (most recent call last):
180
+
181
+ 52: from bin/rails:3:in `<main>'
182
+
183
+ 51: from bin/rails:3:in `load'
184
+
185
+ 50: from /Users/yuharadaiki/Documents/ruby_lesson/sample/bin/spring:15:in `<
186
+
187
+ top (required)>'
188
+
189
+ 49: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby
190
+
191
+ /2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
192
+
193
+ 48: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby
194
+
195
+
196
+
197
+ /2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
198
+
199
+ 47: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11
200
+
201
+ :in `<top (required)>'
202
+
203
+ 46: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11
204
+
205
+ :in `load'
206
+
207
+ 45: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (
208
+
209
+ required)>'
210
+
211
+ 44: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:
212
+
213
+ in `run'
214
+
215
+ 43: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/comman
216
+
217
+ d.rb:7:in `call'
218
+
219
+ 42: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.
220
+
221
+ rb:28:in `call'
222
+
223
+ 41: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.
224
+
225
+ rb:28:in `load'
226
+
227
+ 40: from /Users/yuharadaiki/Documents/ruby_lesson/sample/bin/rails:9:in `<to
228
+
229
+ p (required)>'
230
+
231
+ 39: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
232
+
233
+ _cache/core_ext/kernel_require.rb:31:in `require'
234
+
235
+ Gemfile4:1
236
+
237
+ LFUTF-8Ruby
238
+
239
+ no branchNot on branchGitHubGit (93)1 update
240
+
241
+ 38: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
242
+
243
+ _cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
244
+
245
+ 37: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
246
+
247
+ _cache/loaded_features_index.rb:92:in `register'
248
+
249
+ 36: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
250
+
251
+ _cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
252
+
253
+ 35: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
254
+
255
+ _cache/core_ext/kernel_require.rb:23:in `require'
256
+
257
+ 34: from /Library/Ruby/Gems/2.6.0/gems/railties-5.2.4.5/lib/rails/commands.r
258
+
259
+ b:18:in `<main>'
260
+
261
+ 33: from /Library/Ruby/Gems/2.6.0/gems/railties-5.2.4.5/lib/rails/command.rb
262
+
263
+ :46:in `invoke'
264
+
265
+ 32: from /Library/Ruby/Gems/2.6.0/gems/railties-5.2.4.5/lib/rails/command/ba
266
+
267
+ se.rb:69:in `perform'
268
+
269
+
270
+
271
+ 31: from /Library/Ruby/Gems/2.6.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispat
272
+
273
+ ch'
274
+
275
+ 30: from /Library/Ruby/Gems/2.6.0/gems/thor-1.1.0/lib/thor/invocation.rb:127
276
+
277
+ :in `invoke_command'
278
+
279
+ 29: from /Library/Ruby/Gems/2.6.0/gems/thor-1.1.0/lib/thor/command.rb:27:in
280
+
281
+ `run'
282
+
283
+ 28: from /Library/Ruby/Gems/2.6.0/gems/railties-5.2.4.5/lib/rails/commands/s
284
+
285
+ erver/server_command.rb:142:in `perform'
286
+
287
+ 27: from /Library/Ruby/Gems/2.6.0/gems/railties-5.2.4.5/lib/rails/commands/s
288
+
289
+ erver/server_command.rb:142:in `tap'
290
+
291
+ 26: from /Library/Ruby/Gems/2.6.0/gems/railties-5.2.4.5/lib/rails/commands/s
292
+
293
+ erver/server_command.rb:145:in `block in perform'
294
+
295
+ 25: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
296
+
297
+ _cache/core_ext/kernel_require.rb:31:in `require'
298
+
299
+ 24: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
300
+
301
+ _cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
302
+
303
+ 23: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
304
+
305
+ _cache/loaded_features_index.rb:92:in `register'
306
+
307
+ 22: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
308
+
309
+ _cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
310
+
311
+ 21: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
312
+
313
+ _cache/core_ext/kernel_require.rb:23:in `require'
314
+
315
+ 20: from /Users/yuharadaiki/Documents/ruby_lesson/sample/config/application.
316
+
317
+ rb:7:in `<main>'
318
+
319
+ 19: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler.rb:173:in
320
+
321
+ `require'
322
+
323
+ 18: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/runtime.rb
324
+
325
+ :50:in `require'
326
+
327
+ 17: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/runtime.rb
328
+
329
+ :50:in `each'
330
+
331
+
332
+
333
+ 16: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/runtime.rb
334
+
335
+ :61:in `block in require'
336
+
337
+ 15: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/runtime.rb
338
+
339
+ :61:in `each'
340
+
341
+ 14: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.15/lib/bundler/runtime.rb
342
+
343
+ :66:in `block (2 levels) in require'
344
+
345
+ 13: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
346
+
347
+ _cache/core_ext/kernel_require.rb:31:in `require'
348
+
349
+ 12: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
350
+
351
+ _cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
352
+
353
+ 11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
354
+
355
+ _cache/loaded_features_index.rb:92:in `register'
356
+
357
+ 10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
358
+
359
+ _cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
360
+
361
+ 9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
362
+
363
+ _cache/core_ext/kernel_require.rb:23:in `require'
364
+
365
+ 8: from /Library/Ruby/Gems/2.6.0/gems/uglifier-4.2.0/lib/uglifier.rb:5:in `
366
+
367
+ <main>'
368
+
369
+      7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
370
+
371
+ _cache/core_ext/kernel_require.rb:31:in `require'
372
+
373
+ 6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
374
+
375
+ _cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
376
+
377
+ 5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
378
+
379
+ _cache/loaded_features_index.rb:92:in `register'
380
+
381
+ 4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
382
+
383
+ _cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
384
+
385
+ 3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path
386
+
387
+ _cache/core_ext/kernel_require.rb:23:in `require'
388
+
389
+ 2: from /Library/Ruby/Gems/2.6.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<mai
390
+
391
+ n>'
392
+
393
+ 1: from /Library/Ruby/Gems/2.6.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<mod
394
+
395
+ ule:ExecJS>'
396
+
397
+ /Library/Ruby/Gems/2.6.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
398
+
399
+ : Could not find a JavaScript runtime. See https://github.com/rails/execjs for a lis
400
+
401
+ t of available runtimes. (ExecJS::RuntimeUnavailable)
180
402
 
181
403
  ```
182
404
 
@@ -196,6 +418,14 @@
196
418
 
197
419
 
198
420
 
421
+ gemfileのバージョン指定を外した結果、bundleからgemをインストールするように促されましたので、 'bundle install'を実行したのちに、再度rails sを実行すると上記エラーのうちの最後のものが表示されました。
422
+
423
+
424
+
425
+ bundle exec rails s 及び  rbenv exec rails s を実行したのですが、コマンドがないとエラーが出ました。
426
+
427
+
428
+
199
429
  ### 補足情報(FW/ツールのバージョンなど)
200
430
 
201
431
 

1

編集、追記依頼の対応

2021/03/24 08:53

投稿

H1geD1cky
H1geD1cky

スコア0

test CHANGED
File without changes
test CHANGED
@@ -8,6 +8,148 @@
8
8
 
9
9
 
10
10
 
11
+ (追記)
12
+
13
+   ruby -vの結果ですバージョンは2.5.8になっていました。 -FKMさん
14
+
15
+   gemfileを追加しました。rubyは2.5.8になっているように見えます。-goufさん
16
+
17
+   ruby-versionは自分が動かしているプロジェクト内のものでよろしいのでしょうか? - matuandさん
18
+
19
+
20
+
21
+ ```gemfile
22
+
23
+ source 'https://rubygems.org'
24
+
25
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
26
+
27
+
28
+
29
+ ruby '2.5.8'
30
+
31
+
32
+
33
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
34
+
35
+ gem 'rails', '~> 5.2.3'
36
+
37
+ # Use sqlite3 as the database for Active Record
38
+
39
+ gem 'sqlite3'
40
+
41
+ # Use Puma as the app server
42
+
43
+ gem 'puma', '~> 3.11'
44
+
45
+ # Use SCSS for stylesheets
46
+
47
+ gem 'sass-rails', '~> 5.0'
48
+
49
+ # Use Uglifier as compressor for JavaScript assets
50
+
51
+ gem 'uglifier', '>= 1.3.0'
52
+
53
+ # See https://github.com/rails/execjs#readme for more supported runtimes
54
+
55
+ # gem 'mini_racer', platforms: :ruby
56
+
57
+
58
+
59
+ # Use CoffeeScript for .coffee assets and views
60
+
61
+ gem 'coffee-rails', '~> 4.2'
62
+
63
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
64
+
65
+ gem 'turbolinks', '~> 5'
66
+
67
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
68
+
69
+ gem 'jbuilder', '~> 2.5'
70
+
71
+ # Use Redis adapter to run Action Cable in production
72
+
73
+ # gem 'redis', '~> 4.0'
74
+
75
+ # Use ActiveModel has_secure_password
76
+
77
+ # gem 'bcrypt', '~> 3.1.7'
78
+
79
+
80
+
81
+ # Use ActiveStorage variant
82
+
83
+ # gem 'mini_magick', '~> 4.8'
84
+
85
+
86
+
87
+ # Use Capistrano for deployment
88
+
89
+ # gem 'capistrano-rails', group: :development
90
+
91
+
92
+
93
+ # Reduces boot times through caching; required in config/boot.rb
94
+
95
+ gem 'bootsnap', '>= 1.1.0', require: false
96
+
97
+
98
+
99
+ group :development, :test do
100
+
101
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
102
+
103
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
104
+
105
+ end
106
+
107
+
108
+
109
+ group :development do
110
+
111
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
112
+
113
+ gem 'web-console', '>= 3.3.0'
114
+
115
+ gem 'listen', '>= 3.0.5', '< 3.2'
116
+
117
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
118
+
119
+ gem 'spring'
120
+
121
+ gem 'spring-watcher-listen', '~> 2.0.0'
122
+
123
+ end
124
+
125
+
126
+
127
+ group :test do
128
+
129
+ # Adds support for Capybara system testing and selenium driver
130
+
131
+ gem 'capybara', '>= 2.15'
132
+
133
+ gem 'selenium-webdriver'
134
+
135
+ # Easy installation and use of chromedriver to run system tests with Chrome
136
+
137
+ gem 'chromedriver-helper'
138
+
139
+ end
140
+
141
+
142
+
143
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
144
+
145
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
146
+
147
+
148
+
149
+ ```
150
+
151
+
152
+
11
153
  ### 発生している問題・エラーメッセージ
12
154
 
13
155
 
@@ -26,6 +168,16 @@
26
168
 
27
169
  $ Your Ruby version is 2.6.3, but your Gemfile specified 2.5.8
28
170
 
171
+
172
+
173
+ yuharadaiki@yuharadaikinoMacBook-Pro sample % ruby -v
174
+
175
+ ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-darwin20]
176
+
177
+
178
+
179
+
180
+
29
181
  ```
30
182
 
31
183