Maybe the better way is just use only rb_require(“json”) in C
extension. Before loading extension, in ruby code user should manually
do require “rubygems”. I think it’s better way because it doesn’t
assume that user has rubygems installed. In ruby1.9 there is no
problem because rubygems is built-in into core.
On Thu, 2008-01-31 at 05:33 +0900, Radosław Bułat wrote:
Maybe the better way is just use only rb_require(“json”) in C
extension. Before loading extension, in ruby code user should manually
do require “rubygems”. I think it’s better way because it doesn’t
assume that user has rubygems installed. In ruby1.9 there is no
problem because rubygems is built-in into core.
This is for a controlled environment. I know I have rubygems
I just wanted to understand why the explicit call to “gem” is needed,
since in ruby code it isn’t.