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

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

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

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

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

Q&A

0回答

200閲覧

Rails server エラー

ko_yaN

総合スコア18

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

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

0グッド

0クリップ

投稿2019/04/30 07:07

###急に
rails s を実行したら急にエラーが出るようになりました。
さっきまでは何ともなかったのに...
原因が分かりません。

<エラーメッセージ>
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run rails server -h for more startup options
Exiting
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie/configuration.rb:97:in method_missing': undefined method action_mailer' for #Rails::Application::Configuration:0x00000000066cd3a0 (NoMethodError)
from C:/Users/*** ***/homepage/config/environments/development.rb:34:in block in <top (required)>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie.rb:216:in instance_eval'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/railtie.rb:216:in configure' from C:/Users/*** ***/homepage/config/environments/development.rb:1:in <top (required)>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in require' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in block in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in load_dependency' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in require'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:602:in block (2 levels) in <class:Engine>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:601:in each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/engine.rb:601:in block in <class:Engine>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in instance_exec'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in run' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in block in run_initializers'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:228:in block in tsort_each' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:431:in each_strongly_connected_component_from'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:421:in block in each_strongly_connected_component_from' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in each'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:50:in tsort_each_child' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:415:in call'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:415:in each_strongly_connected_component_from' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:349:in block in each_strongly_connected_component'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in each' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in call'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:347:in each_strongly_connected_component' from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:226:in tsort_each'
from C:/Ruby24-x64/lib/ruby/2.4.0/tsort.rb:205:in tsort_each' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in run_initializers'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/application.rb:361:in initialize!' from C:/Users/*** ***/homepage/config/environment.rb:5:in <top (required)>'
from config.ru:3:in require_relative' from config.ru:3:in block in <main>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in instance_eval' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in initialize'
from config.ru:in new' from config.ru:in <main>'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in eval' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:49:in new_from_string'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/builder.rb:40:in parse_file' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:319:in build_app_and_options_from_config'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:219:in app' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:27:in app'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.7/lib/rack/server.rb:354:in wrapped_app' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:89:in log_to_stdout'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:51:in start' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:147:in block in perform'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in tap' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands/server/server_command.rb:142:in perform'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in perform'
from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/command.rb:46:in invoke' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in <top (required)>'
from bin/rails:4:in require' from bin/rails:4:in <main>'

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

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

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

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

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

urbainleverrier

2019/04/30 07:50

action_mailerの設定はしましたか?`application.rb`やenvironment/、initializers/のファイルでどのような設定の変更を行いましたか?
ko_yaN

2019/04/30 08:20

action_mailer とは何でしょうか?
urbainleverrier

2019/04/30 14:24

railsでメールを使う機能のことです。もし何も設定していないなら、気にしなくて大丈夫です。何か設定関連で不具合があるような気がしましたが、どうでしょうか。
ko_yaN

2019/04/30 14:30

それがわからないんですよね…。 僕初心者なんで本を見ながらやっていたら突然サーバーが開かなくなって… 可能性として考えられるものとかありますか?これだけだと全く分からないですか?
urbainleverrier

2019/04/30 14:51 編集

私も経験は浅いのですが、railsのコードは読んだことがあるので少しは答えられると思いました。ですが、今の所は難しいです。 https://github.com/rails/railsは、コードを公開する場でして、ここにrailsのコードが載っています。 action~やactive~の名のつくものがrailsの機能で、用途に応じて取り付けたり、除いたりできる仕様になっています。action_mailerはrailsにメールの機能を取り付けるということですね。 method_missing: undefined method 〇〇とエラーが出ており、こういうエラーは無限に出ます。これは、コードを書く際に、書き損じて、本来あるべきメソッドがない場合に出るものですが、それが、たまたまaction_mailerというメソッドだっただけで、あらゆるメソッド名がエラーになる可能性がありますから、実際のコードの内容を見ないことには、難しいです。 とはいうものの、action_mailerはrailsが用意しているgemで、基本はそれを取り付け、最小限の設定を行うだけで、使えるようになるはずです。 考えられることというか、予想ですが、application.rbやenvironmentディレクトリ以下のファイル、initializersディレクトリ以下のファイルで、`config.action_mailer`のような記述があるんじゃないかと思います。 これが使えないということなんじゃないかなと。 gemfileというのは、gemという便利なプログラムたちをinstallするためのfileなのですが、gemfile.lockには実際にどんなversionをinstallしたのかその内容が記載されています。action_mailerの記述はありますか? 普通は入っているのですが、これがないかもしれません。
ko_yaN

2019/05/01 04:02

そうなんですね… ググりながら自分で何とかしたいと思います。 詳しい丁寧なアドバイスありがとうございます。参考にさせて頂きます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問