- 레일즈 서버 시작/중지
1 서버 시작[ | ]
Console
Copy
railsuser@zetawiki:~$ cd my_app/
railsuser@zetawiki:~/my_app$ rails server -d
=> Booting WEBrick
=> Rails 4.2.5 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
2 확인[ | ]
Console
Copy
railsuser@zetawiki:~/my_app$ netstat -tnlp | grep ruby
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 18374/ruby
tcp6 0 0 ::1:3000 :::* LISTEN 18374/ruby
Console
Copy
railsuser@zetawiki:~/my_app$ ps -ef | grep ruby | grep -v grep
1000 18374 1 0 11:02 ? 00:00:00 /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby bin/rails server -d
3 서버 중지[ | ]
Console
Copy
railsuser@zetawiki:~/my_app$ kill -9 `pidof ruby`
railsuser@zetawiki:~/my_app$ ps -ef | grep ruby | grep -v grep
railsuser@zetawiki:~/my_app$
4 같이 보기[ | ]
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.