Skip to content
Jeff Su edited this page Sep 15, 2011 · 6 revisions

Installation

NodeJS

First install NodeJS.

(optional) Before you install npm, I suggest that you follow Isaac Z. Schlueter's instructions on NOT installing under 'sudo'. This can be done simply by: sudo chown -R $USER /usr/local The problem with this method is that it doesn't work for multiple users on one dev box.

Now Install Node Package Manager.

Install JS2: npm install js2 Your executable is now called 'js2-node'

Ruby

Assuming you have rubygems installed (as do most ruby developers), all you need to do is run: gem install therubyracer js2 Your executable is now called 'js2-ruby'

Follow instructions for a Rails app if you are using Rails.

RingoJS

RingoJS is a shell for Mozilla's Rhino Javascript runtime language. Assuming you already have ringojs installed, just run: ringo-admin install jeffsu/js2-ringo The problem is that you don't have an executable at this point. Here's an executable script that you can create on your own (js2-ringo): var JS2 = require('js2-full').JS2; system.args.shift(); (new JS2.Commander(system.args)).cli();

Now you can run: ringo js2-ringo