Open the default browser in Ruby -


in python, can this:

import webbrowser webbrowser.open_new("http://example.com/") 

it open passed in url in default browser

is there ruby equivalent?

cross-platform solution

first, install launchy gem:

$ gem install launchy 

then, can run this:

require 'launchy'  launchy.open("http://stackoverflow.com") 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -