Make a ruby script with text IO double clickable executable file?

后端 未结 2 1203
挽巷
挽巷 2021-01-26 19:10

I\'m a beginner at Ruby and I don\'t know how to do this....

Right now I have the script and it runs perfectly in terminal but I was hoping to be able to create a double

2条回答
  •  无人及你
    2021-01-26 20:10

    Well you can write a quick shell script that's basically running your ruby script and make this shell script executable. See the link bellow:

    How to run a shell script in OS X by double-clicking?

    The content of your shell script can be as simple as that:

    ruby /yourpath/yourscript.rb
    

提交回复
热议问题