Problème commande "rails server"

203563
,

Bonjour,

Voila je rencontre un petit problème quand je fais la commande "rails server"

quand je fais la commande "rails server" ça me met :

Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
=> Booting Puma
=> Rails 6.0.2.1 application starting in development 
=> Run `rails server --help` for more startup options
Exiting
Traceback (most recent call last):
    76: from bin/rails:3:in `<main>'
    75: from bin/rails:3:in `load'
    74: from /home/andrei/Documents/Sites/Lab/Rorformation/bin/spring:15:in `<top (required)>'
    73: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    72: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    71: from /var/lib/gems/2.5.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
    70: from /var/lib/gems/2.5.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
    69: from /var/lib/gems/2.5.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
    68: from /var/lib/gems/2.5.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
    67: from /var/lib/gems/2.5.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
    66: from /var/lib/gems/2.5.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
    65: from /var/lib/gems/2.5.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
    64: from /home/andrei/Documents/Sites/Lab/Rorformation/bin/rails:9:in `<top (required)>'
    63: from /var/lib/gems/2.5.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
    62: from /var/lib/gems/2.5.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
    61: from /var/lib/gems/2.5.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
    60: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    59: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
    58: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    57: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
    56: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
    55: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<top (required)>'
    54: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
    53: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
    52: from /var/lib/gems/2.5.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
    51: from /var/lib/gems/2.5.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
    50: from /var/lib/gems/2.5.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
    49: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
    48: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
    47: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
    46: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37:in `start'
    45: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
    44: from /var/lib/gems/2.5.0/gems/rack-2.2.2/lib/rack/server.rb:422:in `wrapped_app'
    43: from /var/lib/gems/2.5.0/gems/rack-2.2.2/lib/rack/server.rb:249:in `app'
    42: from /var/lib/gems/2.5.0/gems/rack-2.2.2/lib/rack/server.rb:349:in `build_app_and_options_from_config'
    41: from /var/lib/gems/2.5.0/gems/rack-2.2.2/lib/rack/builder.rb:66:in `parse_file'
    40: from /var/lib/gems/2.5.0/gems/rack-2.2.2/lib/rack/builder.rb:105:in `load_file'
    39: from /var/lib/gems/2.5.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `new_from_string'
    38: from /var/lib/gems/2.5.0/gems/rack-2.2.2/lib/rack/builder.rb:116:in `eval'
    37: from config.ru:3:in `block in <main>'
    36: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative'
    35: from /var/lib/gems/2.5.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
    34: from /var/lib/gems/2.5.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
    33: from /var/lib/gems/2.5.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
    32: from /var/lib/gems/2.5.0/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
    31: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    30: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
    29: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
    28: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
    27: from /var/lib/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
    26: from /home/andrei/Documents/Sites/Lab/Rorformation/config/environment.rb:5:in `<top (required)>'
    25: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
    24: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
    23: from /usr/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
    22: from /usr/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
    21: from /usr/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
    20: from /usr/lib/ruby/2.5.0/tsort.rb:347:in `call'
    19: from /usr/lib/ruby/2.5.0/tsort.rb:347:in `each'
    18: from /usr/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
    17: from /usr/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
    16: from /usr/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    15: from /usr/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
    14: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
    13: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
    12: from /var/lib/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
    11: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/railtie.rb:84:in `block in <class:Engine>'
    10: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker.rb:35:in `bootstrap'
     9: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/commands.rb:25:in `bootstrap'
     8: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:18:in `refresh'
     7: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/manifest.rb:83:in `load'
     6: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:51:in `public_manifest_path'
     5: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:47:in `public_output_path'
     4: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:43:in `public_path'
     3: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:84:in `fetch'
     2: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:88:in `data'
     1: from /var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:91:in `load'
/var/lib/gems/2.5.0/gems/webpacker-4.2.2/lib/webpacker/configuration.rb:95:in `rescue in load': Webpacker configuration file not found /home/andrei/Documents/Sites/Lab/Rorformation/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /home/andrei/Documents/Sites/Lab/Rorformation/config/webpacker.yml (RuntimeError)

SI vous trouvez ou est l'erreur merci de me le dire

8 Réponse

27818
,

D'après la dernière ligne de ton message d'erreur, tu dois lancer la commande rails webpacker:install

203563
,

quand je fais ça il me met

Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
Traceback (most recent call last):
    2: from /usr/local/bin/yarn:23:in `<main>'
    1: from /usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/rubygems_integration.rb:482:in `block in replace_bin_path'
/usr/share/rubygems-integration/all/gems/bundler-1.17.3/lib/bundler/rubygems_integration.rb:462:in `block in replace_bin_path': can't find executable yarn for gem yarn. yarn is not currently included in the bundle, perhaps you meant to add it to your Gemfile? (Gem::Exception)
Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
27818
,

Maintenant, il te demande d'installer Yarn pour lancer la commande

203563
,

ça me met toujours la meme chose

203563
,

meme si je fait sudo apt remove cmdtest

203563
,

et quand je fais "yarn --version" ça me met

[DEPRECATION] The trollop gem has been renamed to optimist and will no longer be supported. Please switch to optimist as soon as possible.
Yarn v0.1.1 2011 Jesper Kjeldgaard
203563
,

je viens de faire sudo apt-get install bundler et le message a changé ça me met

Traceback (most recent call last):
    4: from bin/rails:3:in `<main>'
    3: from bin/rails:3:in `load'
    2: from /home/andrei/Documents/Sites/Lab/Rorformation/bin/spring:8:in `<top (required)>'
    1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- bundler (LoadError)
203563
,

ça me met aussi ça quand je fais "rails server"