Monday, February 21, 2011

Open the default browser in Ruby


Cross-platform solution
First, install the Launchy gem:
$ [sudo] gem install launchy
Then, you can run this:
require 'rubygems'
require
'launchy'
Launchy.open("http://www.example.com")

No comments:

Post a Comment