[NOT WORKING] Running ruby script as admin

#FROM STACKOVERFLOW
require ‘win32ole’

x = WIN32OLE.new(‘Shell.Application’)
x.ShellExecute(“script.rb”, nil, nil, ‘runas’)

I get a popup saying “This file does not have a program associated with
it for performing…”

It’s pretty much telling the request to run the given “script.rb” as
admin is invalid because it can’t be run as admin.

Or is it? I don’t know but I think it’s that because when I right-click
on a .rb file I cannot see the “run as admin” option on the box.

If irb can be run as admin why can’t the script be run as admin too?
Do I have to go to Control Panel and fix stuff? If so, how?

Ruby is an interpreter language.
You must run Ruby with the ruby-program as argument.

If your documentation lacks all the information that you ask in this
forum, either the register or search-function is inefficient, the author
of the book is a jerk or you did not read it the way you should.

Michael U. wrote in post #1162523:

Ruby is an interpreter language.
You must run Ruby with the ruby-program as argument.

If your documentation lacks all the information that you ask in this
forum, either the register or search-function is inefficient, the author
of the book is a jerk or you did not read it the way you should.

I’m sorry because I don’t have any reliable source/book to learn from.

You can read the standard book online:
http://ruby-doc.com/docs/ProgrammingRuby/
or bye it as an eBook:

Michael U. wrote in post #1162579:

You can read the standard book online:
Programming Ruby: The Pragmatic Programmer's Guide
or bye it as an eBook:
Search

Thanks.