Prabesh Shrestha wrote:> I am trying to parser a ofx file .I have installed ofx-parser gem.
> But I am getting error:
> no such file to load -- hpricot_scan
>
> I have checked my gem folder ,I have got hpricot-0.8.1 which is >
> hpricot-0.6(requirement of ofx-parser)..
>
> My code in the General controller look like
>
> require ''rubygems''
> require ''ofx-parser''
>
> def testing
> ofx = OfxParser::OfxParser.parse(open("C:\\statement.ofx"))
> end
I''ve used that gem in a pure Ruby application and didn''t seem
to have
any trouble with it at the time. Why don''t you start by taking Rails
out
of the picture and try parsing the file in a pure Ruby script. If that
work then try it again inside a Rails app.
By the error it sounds to me like it''s not finding your ofx file, but
who knows.
> ofx = OfxParser::OfxParser.parse(open("C:\\statement.ofx"))
This is a very platform specific statement. I assume you''re not
planning
on taking this style of path to production.
--
Posted via http://www.ruby-forum.com/.