# eRuby on Mac OS X

**URL:** <https://rubytalk.org/t/eruby-on-mac-os-x/9757>\
**Category:** ruby-talk\
**Created:** [20 January 2004 04:40 UTC](https://rubytalk.org/t/eruby-on-mac-os-x/9757 "2004-01-20T04:40:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_McConnell1](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@Kevin\_McConnell1](https://rubytalk.org/u/Kevin_McConnell1)\
**Post date:** [20 January 2004 04:40 UTC](https://rubytalk.org/t/eruby-on-mac-os-x/9757/1 "2004-01-20T04:40:04Z")

</div>

I’m trying to get eRuby and mod\_ruby running on OS X (Panther).  
mod\_ruby seems to be working fine, but if I try to enable eRuby,  
Apache can’t start up and writes the following to the error log:

dyld: /usr/sbin/httpd Undefined symbols:  
\_rb\_cObject  
\_rb\_check\_type  
\_rb\_data\_object\_alloc  
\_rb\_define\_class\_under  
\_rb\_define\_method  
\_rb\_define\_module  
…

So I’m guessing it’s trying to dynamically link to libruby and  
failing…or something…I have no idea what to do about that. Any  
ideas?

I found quite a few postings with the same problem as this, but  
unfortunately couldn’t find any answers ☹

Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![Gennady1](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@Gennady1](https://rubytalk.org/u/Gennady1)\
**Post date:** [20 January 2004 08:13 UTC](https://rubytalk.org/t/eruby-on-mac-os-x/9757/2 "2004-01-20T08:13:09Z")

</div>

The following combination works fine for me:

Mac OS X 10.3.2 (Panther)  
Ruby 1.8.1 Final (–enable-shared)  
Apache 2.0.48  
mod\_ruby 1.1.1 (–with-apxs)  
eruby 1.0.4 (–enable-shared)

Gennady.

> **···**
>
> On Jan 19, 2004, at 20:40, Kevin M wrote:
> 
> > I’m trying to get eRuby and mod\_ruby running on OS X (Panther).  
> > mod\_ruby seems to be working fine, but if I try to enable eRuby,  
> > Apache can’t start up and writes the following to the error log:
> > 
> > dyld: /usr/sbin/httpd Undefined symbols:  
> > \_rb\_cObject  
> > \_rb\_check\_type  
> > \_rb\_data\_object\_alloc  
> > \_rb\_define\_class\_under  
> > \_rb\_define\_method  
> > \_rb\_define\_module  
> > …
> > 
> > So I’m guessing it’s trying to dynamically link to libruby and  
> > failing…or something…I have no idea what to do about that. Any  
> > ideas?
> > 
> > I found quite a few postings with the same problem as this, but  
> > unfortunately couldn’t find any answers ☹
> > 
> > Thanks,  
> > Kevin
> 
> Sincerely,  
> Gennady Bystritsky

---

<div class="post-metadata">

**Author:** ![Kevin\_McConnell1](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@Kevin\_McConnell1](https://rubytalk.org/u/Kevin_McConnell1)\
**Post date:** [20 January 2004 14:55 UTC](https://rubytalk.org/t/eruby-on-mac-os-x/9757/3 "2004-01-20T14:55:01Z")

</div>

> The following combination works fine for me:
> 
> Mac OS X 10.3.2 (Panther)  
> Ruby 1.8.1 Final (–enable-shared)  
> Apache 2.0.48  
> mod\_ruby 1.1.1 (–with-apxs)  
> eruby 1.0.4 (–enable-shared)

Thanks for the info. Is there a reason you are using Apache 2 (as in,  
does it not work with the version that’s ditributed with OS X? I’d  
been trying with that). I had eRuby 1.0.5 and mod\_ruby 1.0.7 (same  
Ruby & OS X versions as you though).

I tried reconfiguring everything with parameters as above, doing a  
make clean; make; make install, and now I get an error\_log message  
saying BUS ERROR instead, and Apache still won’t start. Perhaps I’ve  
made it worse 🙂

One last question though – will the ‘make install’ overwrite files as  
necessary, or might there be something left over I have to clean up  
manually? Sorry if these are dumb questions - I’m still a bit new to  
this 🙂

Cheers,  
Kevin

---

<div class="post-metadata">

**Author:** ![Kevin\_McConnell1](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@Kevin\_McConnell1](https://rubytalk.org/u/Kevin_McConnell1)\
**Post date:** [20 January 2004 16:35 UTC](https://rubytalk.org/t/eruby-on-mac-os-x/9757/4 "2004-01-20T16:35:00Z")

</div>

> mod\_ruby 1.1.1 (–with-apxs)

Just to follow up: getting a newer mod\_ruby solved my problem. Thanks again…

---

<div class="post-metadata">

**Author:** ![Gennady1](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@Gennady1](https://rubytalk.org/u/Gennady1)\
**Post date:** [20 January 2004 16:17 UTC](https://rubytalk.org/t/eruby-on-mac-os-x/9757/5 "2004-01-20T16:17:49Z")

</div>

Kevin M wrote:

> > The following combination works fine for me:
> > 
> > Mac OS X 10.3.2 (Panther)  
> > Ruby 1.8.1 Final (–enable-shared)  
> > Apache 2.0.48  
> > mod\_ruby 1.1.1 (–with-apxs)  
> > eruby 1.0.4 (–enable-shared)
> 
> Thanks for the info. Is there a reason you are using Apache 2 (as in,  
> does it not work with the version that’s ditributed with OS X? I’d  
> been trying with that). I had eRuby 1.0.5 and mod\_ruby 1.0.7 (same  
> Ruby & OS X versions as you though).

I was about to compile Apache anyway to include some specific options,  
so the choice for the latest version was merely because I wanted to stay  
with it as long as possible.

> I tried reconfiguring everything with parameters as above, doing a  
> make clean; make; make install, and now I get an error\_log message  
> saying BUS ERROR instead, and Apache still won’t start. Perhaps I’ve  
> made it worse 🙂

You are almost there 😉 – BUS ERROR was exactly what I got with  
mod\_ruby 1.0.7 – version 1.1.1 (listed as development at the time I  
checked) has some serious fixes for that.

I do not know if it matters or not, however I compiled everything ruby  
related with --prefix=/usr, as I noticed that some software (I do not  
remember what in particular) defaults to prefix /usr, while other to  
/usr/local on Mac OS X.

> One last question though – will the ‘make install’ overwrite files as  
> necessary, or might there be something left over I have to clean up  
> manually? Sorry if these are dumb questions - I’m still a bit new to  
> this 🙂

‘make install’ will overwrite files, however if some files are not used  
by a newer version, they will not be removed. So you may end up with  
some unnecessary garbage. That’s why I usually try to remove everything  
that I know of manually before running ‘make install’.

> **···**
>
> > Cheers,  
> > Kevin
