First you need to download Stanford parser after downloading, you need to put the content of the folder into : /usr/local/stanford-parser/current
After, you need to make sure that your shell has $JAVA_HOME by writting this in the config files of your shell (/etc/bash.bashrc) (default-jdk is a requirement at this stage)
Connect as root (sudo -s) and run:
gem install jrb
gem install treebank
Here you go, ready to use Stanford parser.
irb(main):001:0> require 'rubygems'
irb(main):002:0> require 'stanfordparser'