Was thinking over the weekend it would be cool to be able to parse
some JS in Ruby. Discovered Johnson (and RKelly and a few other
things). I'm currently using an old (2006) Mac Mini and Snow Leopard:
Model Name: Mac mini
Model Identifier: Macmini1,1
Processor Name: Intel Core Duo
Processor Speed: 1.66 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 2 MB
Memory: 2 GB
Bus Speed: 667 MHz
I've been reading your back numbers (what fun) and I guess the lack of
full 64-bit may be a snag. But here goes
~ $ ruby -v
ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-darwin8.11.1]
~ $ file -L `which ruby`
/usr/local/bin/ruby: Mach-O universal binary with 2 architectures
/usr/local/bin/ruby (for architecture i386): Mach-O executable i386
/usr/local/bin/ruby (for architecture ppc): Mach-O executable ppc
~ $ sudo gem install johnson -v "2.0.0.pre3"
Building native extensions. This could take a while...
ERROR: Error installing johnson:
ERROR: Failed to build gem native extension.
checking for jsautocfg.h in /usr/local/lib/ruby/gems/1.8/gems/
checking for jsapi.h in /usr/local/lib/ruby/gems/1.8/gems/
g++ -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.11.1 -I/usr/local/lib/
ruby/1.8/i686-darwin8.11.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -
fno-common -O2 -arch i686 -arch ppc -fno-common -pipe -fno-common -
g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -
Wmissing-noreturn -Winline -DXP_UNIX -c context.cc
In file included from context.h:4,
tracemonkey.h:9:19: error: jsapi.h: No such file or directory
tracemonkey.h:10:20: error: jshash.h: No such file or directory
That was after trying a few different versions before that ... so it
took less time to fail. The thing is, I can see the jsapi.h and the
rest. I don't want to spend an age on Johnson - this week anyway - but
it would be cool to have the full McCoy if it's possible. If not, I'll
go in another direction.
Thanks in advance. It looks a great concept.