Open browser window with Ruby?

How to open a browser window (Safari) from Ruby on Mac and pass it a URL?

+3
source share
2 answers

You can use:

`open #{url}`
+7
source

In principle, the same as answering Peter, just more explicit.

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

Source: https://habr.com/ru/post/1738872/


All Articles