# Bug with sdbm?

**URL:** <https://www.ruby-forum.com/t/bug-with-sdbm/73687>\
**Category:** Ruby\
**Created:** [October 26, 2006, 9:35am UTC](https://www.ruby-forum.com/t/bug-with-sdbm/73687 "2006-10-26T09:35:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [October 26, 2006, 9:35am UTC](https://www.ruby-forum.com/t/bug-with-sdbm/73687/1 "2006-10-26T09:35:40Z")

</div>

I found that when trying to store marshalled data in sdbm, it croaks  
with the message “sdbm\_store failed (SDBMError)” when the marshalled  
object contains binary data, such as a compressed file. dbm and gdbm  
work fine, as does berkeleydb. This is on Freebsd.

Chris

---

<div class="post-metadata">

**Author:** ![snacktime](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Post date:** [October 26, 2006, 1:21pm UTC](https://www.ruby-forum.com/t/bug-with-sdbm/73687/2 "2006-10-26T13:21:51Z")

</div>

snacktime wrote:

> I found that when trying to store marshalled data in sdbm, it croaks  
> with the message “sdbm\_store failed (SDBMError)” when the marshalled  
> object contains binary data, such as a compressed file. dbm and gdbm  
> work fine, as does berkeleydb.

Quoting from Ruby in a Nutshell, page 152:

SDBM:

Public domain implementation of DMB. HAs the same interface as DBM. Runs  
almost anywhere but has inferior performance and data-size limitations  
compared to the other DBMs…

Looks like you’re hitting those limitations.

```
Vince
```
