2013-10-14 41 views
0

上述問題已解決。但有一個新的。網絡服務器沒有啓動。 我已經把下面的代碼在server.rb文件頂點不工作的webserver

# require "vertx" 
# web_server_conf = { 
# 'port' => 8080, 
# 'host' => 'localhost' 
# } 
# # Start the web server, with the config we defined above 
# Vertx.deploy_verticle('mod-web-server', web_server_conf) 
require "vertx" 
include Vertx 
@server = NetServer.new.connect_handler { |socket| 
Pump.new(socket, socket).start 
}.listen(8080, 'localhost') 

當我使用vertx run server.rb,光標移到下一行,然後什麼也沒有發生。即使localhost:8080也不起作用。試了兩個,註釋和未註釋的代碼。 可以請一些身體幫助我!

回答

1

您是否嘗試過使用specified command line呼叫從Ruby examples運行example webserver

+0

我正在嘗試,現在 –

+0

所以,現在似乎有一個tcp問題,因爲網絡服務器正在啓動,但沒有本地主機的響應。任何幫助! –

+0

如果這些示例不起作用,我不確定您設置了錯誤: -/ –