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

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

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

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

Ruby on Rails

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

Q&A

1回答

4048閲覧

rails s で起動ができない

kaoru_tujimiya

総合スコア36

Ruby

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

Ruby on Rails

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

1グッド

2クリップ

投稿2018/11/06 14:17

編集2018/11/07 15:40

ローカル環境で、railstutorialにて学習していてサーバを立ち上げようとしたら
コマンドで以下のようなエラーが発生しました。
以前サーバを閉じずにシャットダウンしてしまったのが問題なのかなと思いながら分からないので
どなたか対処法を教えていください。

cmd

1C:\Users\watak\sample_app>rails s 2=> Booting Puma 3=> Rails 5.2.1 application starting in development 4=> Run `rails server -h` for more startup options 5*** SIGUSR2 not implemented, signal based restart unavailable! 6*** SIGUSR1 not implemented, signal based restart unavailable! 7*** SIGHUP not implemented, signal based logs reopening unavailable! 8Puma starting in single mode... 9* Version 3.12.0 (ruby 2.4.4-p296), codename: Llamas in Pajamas 10* Min threads: 5, max threads: 5 11* Environment: development 12* Listening on tcp://0.0.0.0:3000 13* Listening on tcp://0.0.0.0:3000 14Exiting 15C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/binder.rb:272:in `initialize': Only one usage of each socket address (protocol/network address/port) is normally permitted. - bind(2) for "0.0.0.0" port 3000 (Errno::EADDRINUSE) 16 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/binder.rb:272:in `new' 17 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/binder.rb:272:in `add_tcp_listener' 18 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/binder.rb:105:in `block in parse' 19 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/binder.rb:88:in `each' 20 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/binder.rb:88:in `parse' 21 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/runner.rb:151:in `load_and_bind' 22 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/single.rb:96:in `run' 23 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/puma/launcher.rb:184:in `run' 24 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/puma-3.12.0/lib/rack/handler/puma.rb:70:in `run' 25 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rack-2.0.5/lib/rack/server.rb:297:in `start' 26 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:53:in `start' 27 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform' 28 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `tap' 29 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands/server/server_command.rb:142:in `perform' 30 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' 31 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' 32 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' 33 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/command/base.rb:65:in `perform' 34 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/command.rb:46:in `invoke' 35 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.1/lib/rails/commands.rb:18:in `<top (required)>' 36 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' 37 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' 38 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' 39 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' 40 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' 41 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require' 42 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency' 43 from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require' 44 from bin/rails:4:in `<main>'

以下のような実行を行ったら想定と違ったアンサーがかえって来たのですがこれはどうしてでしょうか?
一番目は空欄で終わり。
二番目はよく理解できない。

cmd

1C:\Users\watak\sample_app>netstat -aon | find "3000" 2 3C:\Users\watak\sample_app>

cmd

1C:\Users\watak\sample_app>net stat -aon | find "3000" 2このコマンドの構文は次のとおりです: 3 4NET 5 [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP | 6 HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START | 7 STATISTICS | STOP | TIME | USE | USER | VIEW ]
退会済みユーザー👍を押しています

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

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

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

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

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

guest

回答1

0

おそらく前回のプロセスもしくは、なにか3000番ポートを使っているものが残っています。

netstat -aon | find "3000"
をコマンドプロンプトから実行すると

TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING ここに数値

的な表示がされると思うので
右端の数値に対してtaskkil /pid 数値を実行してください

終了させる前に何が残っていたのか気になるならばctrl+shift+escでプロセス一覧が出るのでPIDでソートするなりしてください

投稿2018/11/06 22:24

編集2018/11/06 22:26
asm

総合スコア15147

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

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

kaoru_tujimiya

2018/11/07 15:42

ありがとうございます。 今新たに追加した結果がかえってきたのですが、思った答えと違っていて困ってます。 申し訳ございませんがよろしくお願いします。 一番目は,netstat -aon | find "3000" 二番目は、net stat -aon | find "3000"
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問