grob/rp — Issue #2: install not working if piped
Author: oberhamsi
Created: 2012-02-17 09:02:40+00:00
State: open

if i pipe the install.js directly into ringo as recommended by README i get NPE. most recent ringo.

simon@duchov:~/ringojs$ echo `curl -s http://rpr.nomatic.org/install.js` | /home/simon/ringojs/bin/ringo --verbose
Loading module: system
java.lang.NullPointerException
Java Exception: java.lang.NullPointerException
at org.ringojs.engine.Require.call(Require.java:81)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen._stdin__3._c_script_0(:1)
at org.mozilla.javascript.gen._stdin__3.call()
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
at org.mozilla.javascript.gen._stdin__3.call()
at org.mozilla.javascript.gen._stdin__3.exec()
at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
at org.ringojs.tools.RingoShell.runSilently(RingoShell.java:185)
at org.ringojs.tools.RingoShell.run(RingoShell.java:79)
at org.ringojs.tools.RingoRunner.run(RingoRunner.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.ringojs.tools.launcher.Main.run(Main.java:66)
at org.ringojs.tools.launcher.Main.main(Main.java:45)

it worked like this:

$ echo `curl -s http://rpr.nomatic.org/install.js` > ~/Downloads/rpr-install.js
$ ringo ~/Downloads/rpr-install.js
Downloading http://rpr.nomatic.org/download/rp/latest ...
....