I’m looking to include a Windows .exe in my gem and call on that executable from within the gem. All the suggestions I’ve seen for including executable in gems calls for a hashbang to indicate which program should run the executable (typically “#!/usr/bin/env ruby
“). I don’t know of any program to call; I simply want to call the .exe. What would be the best way to do this?
I’m looking to include a Windows .exe in my gem and call on that
Share
The hashbang can make a gem executable but isn’t necessary to simply call the .exe within the gem itself. The calling module was in the gem’s lib/ and the .exe in bin/. I was able to call the .exe from the ruby code with
This works as long as you copy both lib/ and bin/ in the gemspec.