サーバが既に起動していためエラーが出る
$ rails s
=> Booting WEBrick
=> Rails 3.2.14 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown serverA server is already running. Check /worktest/sample/tmp/pids/server.pid.Exiting
サーバ起動中であるためrails serverとすると「server is already running」とエラーがでてしまう。
起動中のプロセス一覧を表示する。
$ ps aux | grep rails
:
:
:
:
76053 0.0 0.0 2423376 324 s001 R+ 6:09PM 0:00.00 grep rails
39598 0.0 0.2 2542512 18880 ?? S 4:56PM 0:02.77 ruby /Users/jizoo/test_app/bin/rails s # ここで起動している
起動中のプロセスIDをkillで終了する。
$ kill -9 39598
もう一度rails serverでWEBrickサーバを起動すると問題なく起動が完了する。
参考サイト
http://qiita.com/ytr_i/items/f5114cfb9ba3b0631bc0
http://dfcblog.net/2013/04/%e6%97%a2%e3%81%abrails%e3%81%8c%e8%b5%b0%e3%81%a3%e3%81%a6%e3%81%84%e3%81%9f%e3%81%9f%e3%82%81%e8%b5%b7%e5%8b%95%e3%81%a7%e3%81%8d%e3%81%aa%e3%81%84%e5%95%8f%e9%a1%8c.html