diff --git a/config.ru b/config.ru index 7e4aec71..ba32cf08 100644 --- a/config.ru +++ b/config.ru @@ -43,12 +43,20 @@ if "#{$PROGRAM_NAME}".include?("tabula.jar") if have_desktop puts "\n======================================================" puts "Launching web browser to #{url}\n\n" - puts "If it does not open in 10 seconds, you may manually open" - puts "a web browser to the above URL." + + begin + desktop.browse(uri) + rescue + puts "Unable to launch your web browser, you will have to" + puts "manually open it to the above URL." + else + puts "If it does not open in 10 seconds, you may manually open" + puts "a web browser to the above URL." + end + puts "When you're done using the Tabula interface, you may" puts "return to this window and press \"Control-C\" to close it." puts "======================================================\n\n" - desktop.browse(uri) else puts "\n======================================================" puts "Server now listening at: #{url}\n\n"