Lance Pollard
Lance Pollard

Reputation: 79478

Open Browser Window with Ruby?

How do I open a browser window (Safari) with Ruby on a Mac and pass it a url?

Upvotes: 3

Views: 4609

Answers (2)

Michael Kohl
Michael Kohl

Reputation: 66867

Basically the same as Peter's answer, just more explicit.

system("open -a Safari #{url}")

Upvotes: 5

Peter
Peter

Reputation: 132407

You can use:

`open #{url}`

Upvotes: 8

Related Questions