質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

599閲覧

rails sが実行されません

jin_707502345

総合スコア8

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/08/16 06:38

railsのサーバーが実行できません。「Yay!You're on Rails!」がブラウザで確認できません。

発生している問題・エラーメッセージ

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

該当のソースコード

rails s

試したこと

rails -v,ruby -vその他railsの環境構築に必要な要素を全てインストールできていることは確認しました。
ここに問題に対して試したことを記載してください。

補足情報(FW/ツールのバージョンなど)

バージョンはrails 6.0.3.2, ruby 2.6.3p62です
ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

gouf

2020/08/16 07:20

「rails webpacker:install」は実行済みですか? 実行した場合、何か変化は見られますか?
jin_707502345

2020/08/17 01:29

「yarn」のインストールもできていなくて、「brew install yarn」を実行した後に「rails webpacker:install」を実行し、「rails s」を実行すると成功しました。やっと「Yay!You're on Rails!」が見られました。ありがとうございます!
gouf

2020/08/17 03:18

解決した場合、他者の回答ないし自己回答として内容をまとめて それをベストアンサーに設定することで、この質問を解決済みにすることができます
guest

回答1

0

自己解決

「brew install yarn」を実行

「rails webpacker:install」を実行

解決

投稿2020/08/20 05:09

jin_707502345

総合スコア8

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問