I’ve inherited a small obj-C utility app that acts as a wrapper around a ruby script (which is obviously included as a resource in the application).
The helper ruby script, though, requires the json gem. What’s the best way to include the gem (and the gem’s dependencies) within the app?
I could have the application run a check when it loads to see if the gem is installed and then gem install it, but I thought there might be a more elegant solution.
The first step is to check if the json gem has any dependencies:
The version I have installed has no dependencies, so then you need to get a copy of the gem into your bundle.
Then, to require it, you can use the line:
replacing VERSION with the gem version.