Ruby and dbf

Hello!

Earlier I wrote how it’s possible to read/write dbf-files in Ruby-programms.

OK, I didn’t find any class to read/write dbf-files in Ruby. But I found
2 classes to read (only) dbf-files from Python. How could I use these
classes in Ruby (if I could make it at all)?

TIA,

Nicolay Vasiliev.

Nicolay Vasiliev n.vasiliev@apatit.com writes:

Hello!

Earlier I wrote how it’s possible to read/write dbf-files in Ruby-programms.

OK, I didn’t find any class to read/write dbf-files in Ruby. But I
found 2 classes to read (only) dbf-files from Python. How could I
use these classes in Ruby (if I could make it at all)?
IIRC, there’s a couple of projects that bind other languages (lua,
python) to ruby. Not to mention the Cardinal project. Search them on
RAA. Dunno, how stable/flexible they are.

– Ed

I have tons of dbf data that I have to manipulate here at work. I started
off using Python(several years ago), but dbf manipulation was so slow that
I had to find a better solution. I neded up using dbf2mysql, which does
a fantastic job importing dbf data into mysql. It even allows you to setup
indexes during the import, and it translates the data to native mysql types
on the fly. Note, there are several dbf2mysql projects, the one I’m talking
about is written by the authors of Mysql, and it’s available here:

http://www.mysql.com/Downloads/Contrib/dbf2mysql-1.14.tar.gz

Cheers,
Travis Whitton

···

In article b1nqej$1gc9$1@bull.east.ru, Nicolay Vasiliev wrote:

Hello!

Earlier I wrote how it’s possible to read/write dbf-files in Ruby-programms.

OK, I didn’t find any class to read/write dbf-files in Ruby. But I found
2 classes to read (only) dbf-files from Python. How could I use these
classes in Ruby (if I could make it at all)?

TIA,

Nicolay Vasiliev.

Does anyone able to suggest: how can I write a wrapper of C+±library
that works with XBase-files for Ruby?

I mean XBase library http://sourceforge.net/projects/xdb/

TIA

Nicolay Vasiliev

Thanks for your advice. As I understand it runs under Unix (I read the
readme file, author wrotes there about compiling under Solaris). Does it
exist under Windows?

I have tons of dbf data that I have to manipulate here at work. I started
off using Python(several years ago), but dbf manipulation was so slow that
I had to find a better solution. I neded up using dbf2mysql, which does
a fantastic job importing dbf data into mysql. It even allows you to setup
indexes during the import, and it translates the data to native mysql types
on the fly. Note, there are several dbf2mysql projects, the one I’m talking
about is written by the authors of Mysql, and it’s available here:

http://www.mysql.com/Downloads/Contrib/dbf2mysql-1.14.tar.gz

TIA,

Nicolay V.

I found an info how can I call Python-modules from Ruby-programms
http://www.goto.info.waseda.ac.jp/~fukusima/ruby/python-e.html

Ed Sinjiashvili ïèøåò:

···

Nicolay Vasiliev n.vasiliev@apatit.com writes:

Hello!

Earlier I wrote how it’s possible to read/write dbf-files in Ruby-programms.

OK, I didn’t find any class to read/write dbf-files in Ruby. But I
found 2 classes to read (only) dbf-files from Python. How could I
use these classes in Ruby (if I could make it at all)?

IIRC, there’s a couple of projects that bind other languages (lua,
python) to ruby. Not to mention the Cardinal project. Search them on
RAA. Dunno, how stable/flexible they are.

– Ed

Nicolay Vasiliev n.vasiliev@apatit.com writes:

Does anyone able to suggest: how can I write a wrapper of C+±library
that works with XBase-files for Ruby?

  • read “README.EXT” file in ruby source root directory
  • read “Extending Ruby” chapter from ProgrammingRuby book
  • look at examples of wrapping C libraries in “ext” directory of ruby
    source (readline, syslog, curses, etc.)

I mean XBase library Xbase (formerly XDB) - Xbase compatible download | SourceForge.net
Contact me off-group - I might help you with the wrapping.

– Ed

I’m sure it will compile under cygwin if you have the mysql-dev headers.

···

In article b1qdbe$1flh$1@bull.east.ru, Nicolay Vasiliev wrote:

Thanks for your advice. As I understand it runs under Unix (I read the
readme file, author wrotes there about compiling under Solaris). Does it
exist under Windows?

Contact me off-group - I might help you with the wrapping.

– Ed

Hi!

Coudn’t send you a mail message, got an error message from your mail-server.

Travis Whitton wrote:

I’m sure it will compile under cygwin if you have the mysql-dev headers.

Which c-compiler it requires?