# OFX-parser

**URL:** <https://www.ruby-forum.com/t/ofx-parser/174368>\
**Category:** Rails\
**Created:** [August 25, 2009, 8:10pm UTC](https://www.ruby-forum.com/t/ofx-parser/174368 "2009-08-25T20:10:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prabesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f05b48/32.png) [@prabesh](https://www.ruby-forum.com/u/prabesh)\
**Post date:** [August 25, 2009, 8:10pm UTC](https://www.ruby-forum.com/t/ofx-parser/174368/1 "2009-08-25T20:10:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![prabesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/f05b48/32.png) [@prabesh](https://www.ruby-forum.com/u/prabesh)\
**Post date:** [August 25, 2009, 11:22pm UTC](https://www.ruby-forum.com/t/ofx-parser/174368/2 "2009-08-25T23:22:09Z")

</div>

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.
