How can I use Berkeley DB with Ruby?

I'm a Thai student. My teacher ordered me to use Berkeley DB in the term
project. I saw in BDB website that BDB is worked with Ruby but I don't
have any idea to connect it.

Anyone knows how to connect it? I've used mysql in the last project. Now
I want to know is it work if I'll use BDB with Ruby?

···

--
Posted via http://www.ruby-forum.com/.

Siratinee Sukachai wrote:

I'm a Thai student. My teacher ordered me to use Berkeley DB in the term
project. I saw in BDB website that BDB is worked with Ruby but I don't
have any idea to connect it.

Anyone knows how to connect it? I've used mysql in the last project. Now
I want to know is it work if I'll use BDB with Ruby?

Try tu use dbm (This is a Ruby extension to DBM library (including
Berkley DB's DBM))

···

--
Posted via http://www.ruby-forum.com/.

There are these packages:

http://moulon.inra.fr/ruby/bdb1.html

http://moulon.inra.fr/ruby/bdb.html

···

On Aug 13, 2008, at 21:26 PM, Siratinee Sukachai wrote:

I'm a Thai student. My teacher ordered me to use Berkeley DB in the term
project. I saw in BDB website that BDB is worked with Ruby but I don't
have any idea to connect it.

Anyone knows how to connect it? I've used mysql in the last project. Now
I want to know is it work if I'll use BDB with Ruby?

Siratinee Sukachai wrote:

I'm a Thai student. My teacher ordered me to use Berkeley DB in the term
project. I saw in BDB website that BDB is worked with Ruby but I don't
have any idea to connect it.

Anyone knows how to connect it? I've used mysql in the last project. Now
I want to know is it work if I'll use BDB with Ruby?

Anyone can help me more?
I still have no idea for solve this problem.... :frowning:

···

--
Posted via http://www.ruby-forum.com/.

This is example code:

# ruby dbm acess
require "dbm"

d = DBM.open("test")
keys = d.keys
if keys.length > 0 then
  for k in keys; print k, "\n"; end
  for v in d.values; print v, "\n"; end
else
  d['foobar'] = 'FB'
  d['baz'] = 'BZ'
  d['quux'] = 'QX'
end

···

--
Posted via http://www.ruby-forum.com/.

Eric Hodel wrote:

···

On Aug 13, 2008, at 21:26 PM, Siratinee Sukachai wrote:

I'm a Thai student. My teacher ordered me to use Berkeley DB in the
term
project. I saw in BDB website that BDB is worked with Ruby but I don't
have any idea to connect it.

Anyone knows how to connect it? I've used mysql in the last project.
Now
I want to know is it work if I'll use BDB with Ruby?

There are these packages:

http://moulon.inra.fr/ruby/bdb1.html

http://moulon.inra.fr/ruby/bdb.html

The links for download is not working right now!!
--
Posted via http://www.ruby-forum.com/.