I get the following message in the browser but the casperjs script runs fine in the terminal ont the server.
Gecko error: it seems /usr/bin/firefox is not compatible with SlimerJS. See Gecko version compatibility. If version is correct, launch slimerjs with --debug=true to see Firefox error message
The solution to the problem is to install xvfb on the server and then run script with : xvfb-run -a casperjs --engine=slimerjs mycasperjs_script.js The reason for this error is that you need to make slimerjs headless and Mozilla's gecko engine isn't.