Hello, I am trying to implement a gem called stanfordparser which can be found here: http://stanfordparser.rubyforge.org/
It is a ruby wrapper for a java natural language parser
I am developing in netbeans using ruby on rails / jruby on a windows 7 machine. My web app works fine otherwise, but when I try to add the parser wrapper it breaks.
Here is the code that is causing a problem:
gem 'stanfordparser'
def show
parser = StanfordParser::LexicalizedParser.new
@words = parser.apply("This is a sentence.")
end
this is in the taskscontroller
and when I go to tasks/show (which, if i remove this code, works fine) I get the following error
uninitialized constant TasksController::StanfordParser
I have made sure the gem is installed in netbeans
I am very new to ruby on rails, and teaching myself, so it may be something obvious
Thanks!
EDIT: I checked my glassfish server logs and it says
SEVERE: Missing these required gems:
stanfordparser
which is weird because I've installed the gem using netbeans, I've done rake gems:install and netbeans says the gem is installed. I've checked in netbeans gems folder and the gem is installed there.
EDIT 2:
So, after a lot of research and head banging, I've decided to simplify things a bit by just trying to use jruby to implement the java classes, now I need to figure out how to import the stanfordparser java classes (there are at least 50), I think I need to compress all the classes into a jar so that jruby can load it. maybe.