ruby-spidermonkey on OS X (10.5 Leopard)
$ svn checkout http://ruby-spidermonkey.googlecode.com/svn/trunk/ ruby-spidermonkey-read-only
$ cd ruby-spidermonkey-read-only
$ ruby extconf.rb
checking for xulrunner-js... no
checking for thunderbird-js... no
checking for mozilla-js... no
checking for main() in -lsmjs... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
So what now? Well, I do have spidermonkey installed as part of CouchDB via macports. It’s okay if you don’t, you can install it via macports quite easily:
$ sudo port install spidermonkey
Current macport version is 1.7.0.
If you have macports setup with the defaults, this puts it in:
/opt/local/var/macports/software/spidermonkey/
So we can head back into the ruby-spidermonkey-read-only directory we were in before and:
$ ruby extconf.rb —with-js-lib=/opt/local/var/macports/software/spidermonkey/1.7.0_0/opt/local/lib/
checking for xulrunner-js… no
checking for thunderbird-js… no
checking for mozilla-js… no
checking for main() in -ljs… yes
creating Makefile$>
