Question

I'm running (on Windows) a Ruby script using Watir to automate some things for a specific website.

This script works but I wonder if it's possible to launch it directly from the browser?

In fact, what I want is to click on a favorites button (underline on the image of the link above) on my personnal bar and that it launch my script. (I don't know if it's really clear...)

Screenshot

To do this my first idea was to create a html file which launch my ruby script but I don't know at all how to launch a ruby script from a html (if it's possible)...

So if you have any idea, say it ;)

Was it helpful?

Solution

I suppose you could run a local Rails app (server), which is then going to run any Ruby code in a controller — e.g. where you could invoke a commandline process like running a Ruby script.

Any browser bookmark is principally going to go to a webpage. So you will need a webpage served locally, which then executes (local) server-side code that invokes your script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top