Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Executable gem - Windows

I am trying to create an executable gem on windows machine. But i am not sure how do make the file executable in windows? Is there any way i can create the same on windows? Here is what i did so far: created a file and then right click and update the permission to read and execute. But its not working. I am keeping this file under bin folder as mentioned " here " in the link

like image 688
Sunilkumar V Avatar asked Apr 10 '26 09:04

Sunilkumar V


1 Answers

A gem is not executable itself, it is a bundled collection of Ruby scripts and other files which can be executable. You can compare it with a Zip file. The purpose is to easily distribute your projects tot other computers. When you gem install the gem and require the gem in a script then you can use what the gem has to offer.

It is possible to execute the scripts and executable files when you use the full path in your console or when the path is included in the Windows path environtment variable. Sometimes a .bat or .cmd (in Windows) is provided that can be called but it just executes some other Ruby scripts.

like image 172
peter Avatar answered Apr 11 '26 23:04

peter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!