Lorsque j'essaie de démarrer une application que j'ai créée après une longue période, l'erreur suivante est générée et l'application ne démarre pas. Enregistrez les étapes correspondantes. (Il y a eu des problèmes tels que les versions ne correspondant pas, mais j'écrirai ceci dans un article séparé.) C'est une très longue erreur, alors soyez prudent.
Il s'agit de l'erreur générée lorsque la commande rails -s a été exécutée dans le chemin racine de l'application.
Erreur 1:
[staff@term]rails s
Ignoring nokogiri-1.10.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.1
Ignoring bcrypt-3.1.12 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.12
Ignoring bindex-0.7.0 because its extensions are not built. Try: gem pristine bindex --version 0.7.0
Ignoring bindex-0.5.0 because its extensions are not built. Try: gem pristine bindex --version 0.5.0
Ignoring binding_of_caller-0.8.0 because its extensions are not built. Try: gem pristine binding_of_caller --version 0.8.0
Ignoring bootsnap-1.4.3 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.3
Ignoring bootsnap-1.4.1 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.1
Ignoring bootsnap-1.4.0 because its extensions are not built. Try: gem pristine bootsnap --version 1.4.0
Ignoring bootsnap-1.3.2 because its extensions are not built. Try: gem pristine bootsnap --version 1.3.2
-------Partiellement omis
Erreur 2:
Traceback (most recent call last):
61: from bin/rails:3:in `<main>'
60: from bin/rails:3:in `load'
59: from /Users/ichikawadaisuke/projects/krown/bin/spring:15:in `<top (required)>'
58: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
57: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
56: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
55: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
54: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
53: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
52: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
51: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
50: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
49: from /Users/ichikawadaisuke/projects/krown/bin/rails:9:in `<top (required)>'
48: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
47: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
46: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
45: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
44: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
43: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
42: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
41: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
40: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>'
39: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
38: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
37: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
36: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
35: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
34: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `perform'
33: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in `tap'
32: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:145:in `block in perform'
31: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
30: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
29: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
28: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
27: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
26: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
25: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
24: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
23: from /Users/ichikawadaisuke/projects/krown/config/application.rb:7:in `<main>'
22: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler.rb:114:in `require'
21: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `require'
20: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:65:in `each'
19: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `block in require'
18: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:76:in `each'
17: from /Users/ichikawadaisuke/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
16: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
15: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
14: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
13: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
12: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
11: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/uglifier-4.1.20/lib/uglifier.rb:5:in `<main>'
10: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
9: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
8: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
7: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
6: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
5: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
4: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
3: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/bootsnap-1.4.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
2: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<main>'
1: from /Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/Users/ichikawadaisuke/projects/krown/vendor/ruby/2.5.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
Comme la quantité de sortie d'erreur est très grande, j'ai pensé qu'il serait peut-être plus rapide de reconstruire l'environnement, mais j'ai décidé de définir une heure et de répondre.
Étant donné que d'autres applications sont démarrées en arrière-plan, lors de l'installation avec la commande homebrew, cela échoue en cours de route. Parallèlement à cela, après la récupération du système d'exploitation, les applications liées à Rails telles que Xcode ont été reconfigurées. On suppose que l'erreur 1 a été résolue par "installation groupée" car l'environnement Gem a également été modifié par ces opérations.
La façon de traiter l'erreur 2 sera publiée dans un article séparé.
Recommended Posts