0

So I've written my first soon-to-be-open-sourced script (an Alfred Workflow). I've written the nuts-and-bolts in Ruby but have been having some trouble getting it to work on the vanilla OSX ruby (script uses Nokogiri which has some weirdness with stock ruby).

So what I'd like to do - if possible - is include a specific ruby binary along with the script ZIP and run the script against that binary. I.e. reference /myscript/bin/ruby instead of just ruby

Is this possible? Everything I've read regarding ruby versioning seems to relate to RVM, and I don't want to ask people to mess with installing ruby/rvm on their local machines -- ideally I'd like to be able to just distribute a single package with all dependencies local.

Any thoughts?

nlh
  • 1,055
  • 1
  • 10
  • 15

1 Answers1

0

The basic answer is that this is impossible as currently conceived. You cannot distribute binaries, binaries must be compiled on the local machine. This means you have two basic options:

[1] remove the dependency on Nokogiri [2] include a compile script to compile a Ruby binary on the user's computer

smargh
  • 876
  • 9
  • 19