It adds a number of features to Rhino that make it suitable for real-world, large-scale application development:
- A fast, auto-reloading, and CommonJS-compliant module loader.
- A rich set of modules covering I/O, logging, development tools and much more.
- Support for blocking and non-blocking I/O.
- Scalable HTTP server based on the Jetty project.
- Support for CommonJS packages to install or write additional software components.
For more information, visit the RingoJS web site: http://ringojs.org/
If you have these installed, building Ringo is straightforward:
Check out Ringo using Git:
git clone git://github.com/ringo/ringojs.git
Change to the ringojs directory and run the ant
update task to fetch
Then run the
jar task to compile the code and build the jar file:
docs task to build the documentation:
It is recommended but not strictly required to add the ringojs bin directory to your PATH environment variable. If you don’t you’ll have to type the full path to the bin/ringo command in the examples below.
To start the Ringo shell, just run the ringo command without any arguments:
To run a script simply pass it to ringo on the command line. For example, to run the Ringo test suite:
Use the basic ringo-admin command to create a new web application or install packages. To create a blank Ringo web app:
ringo-admin create [appdir]
To install a package from a zip URL:
ringo-admin install [packageurl]
Installing a package manager
Ringo does not ship with a built-in package manager.
An easy way to manage packages and their dependencies is the evolving Ringo package manager rp.
The main benefit of rp over
ringo-admin is that rp downloads dependencies defined in the packages descriptors.
rp can install any package available in its online registry.
To install rp itself you can use the ringo-admin tool:
ringo-admin install grob/rp
For more information visit the rp documentation wiki.