# Digest.rb including wrong files on MacOSX

**URL:** <https://www.ruby-forum.com/t/digest-rb-including-wrong-files-on-macosx/86278>\
**Category:** Ruby\
**Created:** [February 21, 2007, 3:27am UTC](https://www.ruby-forum.com/t/digest-rb-including-wrong-files-on-macosx/86278 "2007-02-21T03:27:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmyether](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9a140/32.png) [@jimmyether](https://www.ruby-forum.com/u/jimmyether)\
**Post date:** [February 21, 2007, 3:27am UTC](https://www.ruby-forum.com/t/digest-rb-including-wrong-files-on-macosx/86278/1 "2007-02-21T03:27:37Z")

</div>

I have been trying to install a Rails app called devalot  
([http://software.pmade.com/devalot](http://software.pmade.com/devalot)) on my Mac (10.4 Tiger). I built  
Ruby 1.8.5 from source on this box, and have been using it daily for  
weeks for Rails development and other, non-Rails R. playing.

In the setup process, it requires a ruby script to run to do some setup:

ruby script/setup.rb

When I run this script, I get this error:

/usr/local/lib/ruby/site\_ruby/1.8/digest.rb:16:in `const\_missing’:  
Digest class not found: Digest::SHA384 (NameError)

Now, when I look in /usr/local/lib/ruby/site\_ruby/1.8/digest.rb, I  
find these lines:

require ‘digest.so’

module Digest  
autoload “SHA256”, “digest/sha2.so”  
autoload “SHA384”, “digest/sha2.so”  
autoload “SHA512”, “digest/sha2.so”  
…

Now, I don’t have any .so files lying around. I believe the right  
things are .bundle files on MacOSX.

I have, in /usr/local/lib/ruby/site\_ruby/1.8/i686-darwin8.8.2, a  
digest.bundle and a digest/sha2.bundle. I have the same thing in  
/usr/local/lib/ruby/1.8/i686-darwin8.8.2. I don’t know why they’re in  
both places. They’re not symlinks, and cmp(1) says they’re identical  
files. Anyway…

Anyway, can someone tell me what I appear to have done wrong, or what  
Ruby did wrong, when I built it to get into this situation?

By way of comparison, the hpricot gem does

require ‘hpricot\_scan’

and then there is in its lib dir both ‘hpricot\_scan.so’ and  
‘hpricot\_scan.bundle’.

Any ideas of where to start?

---

<div class="post-metadata">

**Author:** ![jimmyether](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9a140/32.png) [@jimmyether](https://www.ruby-forum.com/u/jimmyether)\
**Post date:** [February 21, 2007, 3:58am UTC](https://www.ruby-forum.com/t/digest-rb-including-wrong-files-on-macosx/86278/2 "2007-02-21T03:58:42Z")

</div>

Just a quick update to this, the whole “trying to install this app”  
thing was an inadvertent red herring on my part: the problem shows up  
in just trying to run Ruby’s ‘make test-all’:

~/src/ruby rew$ make test-all  
./miniruby ./runruby.rb --extout=.ext – “./test/runner.rb”  
–basedir="./test" --runner=console  
/Users/rew/src/ruby/.ext/common/digest.rb:16:in `const\_missing’:  
Digest class not found: Digest::SHA384 (NameError)  
make: \*\*\* [test-all] Error 1

If anyone could shed some light on what is going on here, or how to  
fix it, I’d be very much obliged.

---

<div class="post-metadata">

**Author:** ![jimmyether](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e9a140/32.png) [@jimmyether](https://www.ruby-forum.com/u/jimmyether)\
**Post date:** [February 21, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/digest-rb-including-wrong-files-on-macosx/86278/3 "2007-02-21T15:00:41Z")

</div>

On 2/20/07, Ryan W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Just a quick update to this, the whole “trying to install this app”  
> thing was an inadvertent red herring on my part: the problem shows up  
> in just trying to run Ruby’s ‘make test-all’:

This seems like a bug in Ruby; I would post this to ruby-core or on  
[rubyforge.org](http://rubyforge.org)’s Ruby bug tracker.

-austin
