Build.rb requires rubygems #119

cpsubrian opened this Issue Jun 17, 2012 · 4 comments


None yet

3 participants


Forgive any incorrect vocabulary, I'm a ruby noob.

On my new dev machine (OSX Lion, Ruby 1.8.7) I was unable to run build.rb due to a requires error ('json'). After some googling, there are two solutions.

Solution that requires no changes to the code: Run the build script with a RUBYOPTS env variable set to -rubygems like:

$ RUBYOPT=-rubygems ./build.rb


Add require 'rubygems' above the require 'json' line in build.rb.

Either of these fixes allowed me to run the build script.

If we are going with the first, it probably warrants a little note in the readme.


actually that's because build.rb is for ruby 1.9 which has native json. It works in 1.8 yes, but that's a side effect


Gotcha .. well. .. this issue can serve as an archive for people running the stock OSX build of ruby .. at least as long as it happens to maintain backwards compatibility.

molily commented Jun 21, 2012

If we use the first solution, people with a vanilla system Ruby still need to gem install rubygems and gem install json before, right? (I’m asking for the documentation.)

@molily molily closed this in c01c291 Jun 21, 2012

I don't remember if I had to install rubygems or json ... I think I may have had to install json but not rubygems. TBH the existence of this issue is almost enough to solve this, but adding the require just makes it that much easier. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment