From 03775bf46c6d58f83ec24c426779a42d0a3d40f1 Mon Sep 17 00:00:00 2001 From: Max Pleaner Date: Fri, 29 Jan 2016 14:19:19 -0800 Subject: [PATCH] Change phantom.args to system.args `phantom.args` is deprecated (link)[http://phantomjs.org/api/phantom/property/args.html) The readme just needed to be updated. For me, I just followed the default install instructions. I'm on Ruby 2.2.0 The fix for me was to use `system.args` instead. Unfortunately Phantom can be hard to debug since there are no error traces whatsoever. Thanks for the useful gem by the way --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85acff5..5c0ef0d 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,9 @@ Use `Phantomjs.run` to run the passed script file. ```js // my_runner.js -var arg1 = phantom.args[0]; -var arg2 = phantom.args[1]; +var system = require("system") +var arg1 = system.args[0]; +var arg2 = system.args[1]; console.log(arg1 + ' ' + arg2); ```