I want the Ruby Script file to run as an executable from any Windows XP directory. I created a test.rb file (Ruby Script) and I want to run it from any Windows directory, for example, as "test", "C: \ test" or "C: \ Directory \ test" launches my test.rb file.
#!/usr/bin/envy ruby p "Hi this is my test file"
I added the shebang code to my ruby ββfile, but when I need to run Ruby Script, I need to find the Script file and execute it explicitly as "ruby test.rb".
I also executed the executable by running the command: $ chmod +x hello-world.rb , but it still does not work.
Thanks in advance.
source share