Using libv8 3.11 on OS X 10.9 Mavericks

My customer’s test and continuous integration servers are running an older version of linux that simply won’t build the libv8 3.16.x.x as required by the more recent 0.12.0 release of therubyracer gem. Those servers seem to only be able to build therubyracer 0.11.4 and libv8 3.11. OS X Mavericks is the opposite…just great!

I finally found a post on github on how to get libv8 3.11 to build on Mavericks. A patch was issued in the 3.11 branch, but hasn’t been released. So you can proceed by checking out this branch from github and building yourself.

    git clone https://github.com/cowboyd/libv8.git
    cd libv8
    git checkout 3.11
    bundle install
    bundle exec rake clean build binary
    gem install pkg/libv8-3.11.8.17-x86_64-darwin-13.gem

The original post is here.

Javascript, Internet Explorer and Reserved Words

Today, I came across this Javascript:

    parent = $(this).parent();
    //...
    inputFileId =  $(parent).data('input-file-id');

This code works fine in Safari and Chrome, but breaks in IE due to difference in scoping. Apparently, in IE, just calling “parent” without a receiving object actually invokes window.parent. I suppose that is why parent is a reserved word in Javascript.

Hello!

I’m Shawn. I’m the founder of Motivated Software and Design, LLC. I’ve been writing code professionally since 1998. I’ve written software for various web, desktop, server, and mobile platforms over my career. I’ll be using this blog to share experiences as I continue to build great applications.