Browse files

Fixes #36 (error thrown when trying to determine the best IP to use f…

…or a server with no private IP addresses); per Nick's request changing this to default to the localhost IP address ( rather than throwing an error if no IP addresses can be found through the Socket class.
  • Loading branch information...
1 parent be44d29 commit cf7c2a15d697c2061110932dd7ccf03feeb23452 Tom McSweeney committed May 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/project_razor/config/server.rb
@@ -121,8 +121,8 @@ def get_an_ip
# has no private IP addresses, so look for a public IP address
# to use instead
ip = Socket.ip_address_list.detect { |intf| intf.ipv4? } unless ip
- # if the "ip" value is still nil, raise an error
- raise RuntimeError, "No valid IP address found for the Razor server" unless ip
+ # if the "ip" value is still nil, default to the localhost
+ ip = '' unless ip

0 comments on commit cf7c2a1

Please sign in to comment.