Created
June 12, 2012 21:49
-
-
Save anonymous/2920345 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/home/user1/.rvm/rubies/ruby-1.9.3-p194/bin/ruby | |
require 'webrick' | |
root = File.expand_path '~/public_html' | |
server = WEBrick::HTTPServer.new :Port => 8000, :DocumentRoot => root | |
trap 'INT' do server.shutdown end | |
server.start | |
user1@mybox:~/public_html$ ruby runwebrick.rb | |
[2012-06-12 ] INFO WEBrick 1.3.1 | |
[2012-06-12 ] INFO ruby 1.9.3 (2012-04-20) [i686-linux] | |
[2012-06-12 ] WARN TCPServer Error: Address already in use - bind(2) | |
user1@mybox:~/public_html$ ruby runwebrick.rb | |
[2012-06-12 ] INFO WEBrick 1.3.1 | |
[2012-06-12 ] INFO ruby 1.9.3 (2012-04-20) [i686-linux] | |
[2012-06-12 ] WARN TCPServer Error: Address already in use - bind(2) | |
[2012-06-12 ] INFO WEBrick::HTTPServer#start: pid=2928 port=8000 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment