# Trouble installing eRuby on MacOS X 10.3

**URL:** <https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788>\
**Category:** ruby-talk\
**Created:** [22 January 2004 00:05 UTC](https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788 "2004-01-22T00:05:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavin\_Kistner2](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gavin\_Kistner2](https://rubytalk.org/u/Gavin_Kistner2)\
**Post date:** [22 January 2004 00:05 UTC](https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788/1 "2004-01-22T00:05:00Z")

</div>

All day I have been trying to get mod\_ruby and eRuby installed on MacOS  
X 10.3 (Panther) with Apache 1.3.  
I’m close, but not yet there.

(When finished I will post the full details of what I needed to do.)

mod\_ruby and eRuby both claim to have succeeded in the whole  
configure/make/make install steps.

However, when I uncomment the following line in httpd.conf…  
#RubyRequire apache/eruby-run  
…Apache fails to start up. (The directive “RubyRequire  
apache/ruby-run” works just fine.)

I’m assuming that perhaps the problem is that the eRuby installer put  
the library in the wrong location. When I perform “make install” I see:  
liberuby.a -\> /usr/local/lib/liberuby.a  
chmod 0644 /usr/local/lib/liberuby.a

Is this the correct location for it to go? If not, where should it go?  
Apache is a new working install in the standard location of:  
/usr/local/apache/  
And the mod\_ruby.so file was correctly installed into:  
/usr/local/apache/libexec/mod\_ruby.so

As more information, following is the output of the configure and ‘make  
install’ commands for eRuby and mod\_ruby, and then the output of the  
error log upon trying to start it with the line uncommented.

Any pointers on getting this working would be really appreciated.

[/tmp/ruby/eruby-1.0.5] root# ./configure.rb  
checking whether we are using gcc… yes  
checking Ruby version… 1.8.1  
checking for default charset… iso-8859-1  
checking whether enable shared… no  
creating config.h  
creating Makefile

…

[/tmp/ruby/eruby-1.0.5] root# make install  
liberuby.a -\> /usr/local/lib/liberuby.a  
chmod 0644 /usr/local/lib/liberuby.a

…

[/tmp/ruby/mod\_ruby-1.0.7] root# ./configure.rb  
–with-apxs=/usr/local/apache/bin/apxs --enable-eruby  
checking for a BSD compatible install… /usr/bin/install -c  
checking whether we are using gcc… yes  
checking Ruby version… 1.8.1  
checking for static Apache module support… no  
checking for dynamic Apache module support… yes  
checking for eruby… yes  
creating Makefile  
creating libruby.module  
creating doc/Makefile

…

[/tmp/ruby/mod\_ruby-1.0.7] root# make install  
/usr/bin/install -c -d /usr/local/apache/libexec  
/usr/bin/install -c -m 555 mod\_ruby.so /usr/local/apache/libexec  
/usr/bin/install -c -d /usr/local/lib/ruby/1.8/apache  
for file in apache/ruby-run.rb apache/eruby-run.rb apache/erb-run.rb  
apache/rd2html.rb apache/ruby-debug.rb apache/eruby-debug.rb  
auto-reload.rb; do   
/usr/bin/install -c -m 644  
/private/tmp/ruby/mod\_ruby-1.0.7/lib/$file /usr/local/lib/ruby/1.8/$file;   
done

…

[local/apache/logs] root# cat error\_log  
dyld: /usr/local/apache/bin/httpd Undefined symbols:  
\_rb\_cObject  
\_rb\_check\_type  
\_rb\_data\_object\_alloc  
\_rb\_define\_class\_under  
\_rb\_define\_method  
\_rb\_define\_module  
\_rb\_define\_singleton\_method  
\_rb\_define\_virtual\_variable  
\_rb\_eStandardError  
\_rb\_eval\_string\_wrap  
\_rb\_file\_open  
\_rb\_funcall  
\_rb\_gc\_mark  
\_rb\_global\_variable  
\_rb\_intern  
\_rb\_io\_close  
\_rb\_io\_gets  
\_rb\_protect  
\_rb\_provide  
\_rb\_raise  
\_rb\_set\_kcode  
\_rb\_stdin  
\_rb\_str2cstr  
\_rb\_str\_cat  
\_rb\_str\_freeze  
\_rb\_str\_new  
\_rb\_str\_new2  
\_re\_mbctab  
\_ruby\_debug  
\_ruby\_show\_version  
\_ruby\_top\_self  
\_ruby\_verbose  
\_ruby\_xmalloc

> **···**
>
> –  
> (-, /\ / / //

---

<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:** [22 January 2004 00:13 UTC](https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788/2 "2004-01-22T00:13:36Z")

</div>

1. Run configure with option “–enable-shared” where appropriate.
2. Get mod\_ruby version 1.1.1 (development), 1.0.7 is known to have  
problems on Mac OS X.

Gennady.

Gavin Kistner wrote:

> **···**
>
> > All day I have been trying to get mod\_ruby and eRuby installed on MacOS  
> > X 10.3 (Panther) with Apache 1.3.  
> > I’m close, but not yet there.
> > 
> > (When finished I will post the full details of what I needed to do.)
> > 
> > mod\_ruby and eRuby both claim to have succeeded in the whole  
> > configure/make/make install steps.
> > 
> > However, when I uncomment the following line in httpd.conf…  
> > #RubyRequire apache/eruby-run  
> > …Apache fails to start up. (The directive “RubyRequire  
> > apache/ruby-run” works just fine.)
> > 
> > I’m assuming that perhaps the problem is that the eRuby installer put  
> > the library in the wrong location. When I perform “make install” I see:  
> > liberuby.a → /usr/local/lib/liberuby.a  
> > chmod 0644 /usr/local/lib/liberuby.a
> > 
> > Is this the correct location for it to go? If not, where should it go?  
> > Apache is a new working install in the standard location of:  
> > /usr/local/apache/  
> > And the mod\_ruby.so file was correctly installed into:  
> > /usr/local/apache/libexec/mod\_ruby.so
> > 
> > As more information, following is the output of the configure and ‘make  
> > install’ commands for eRuby and mod\_ruby, and then the output of the  
> > error log upon trying to start it with the line uncommented.
> > 
> > Any pointers on getting this working would be really appreciated.
> > 
> > [/tmp/ruby/eruby-1.0.5] root# ./configure.rb  
> > checking whether we are using gcc… yes  
> > checking Ruby version… 1.8.1  
> > checking for default charset… iso-8859-1  
> > checking whether enable shared… no  
> > creating config.h  
> > creating Makefile
> > 
> > …
> > 
> > [/tmp/ruby/eruby-1.0.5] root# make install  
> > liberuby.a → /usr/local/lib/liberuby.a  
> > chmod 0644 /usr/local/lib/liberuby.a
> > 
> > …
> > 
> > [/tmp/ruby/mod\_ruby-1.0.7] root# ./configure.rb  
> > –with-apxs=/usr/local/apache/bin/apxs --enable-eruby  
> > checking for a BSD compatible install… /usr/bin/install -c  
> > checking whether we are using gcc… yes  
> > checking Ruby version… 1.8.1  
> > checking for static Apache module support… no  
> > checking for dynamic Apache module support… yes  
> > checking for eruby… yes  
> > creating Makefile  
> > creating libruby.module  
> > creating doc/Makefile
> > 
> > …
> > 
> > [/tmp/ruby/mod\_ruby-1.0.7] root# make install  
> > /usr/bin/install -c -d /usr/local/apache/libexec  
> > /usr/bin/install -c -m 555 mod\_ruby.so /usr/local/apache/libexec  
> > /usr/bin/install -c -d /usr/local/lib/ruby/1.8/apache  
> > for file in apache/ruby-run.rb apache/eruby-run.rb apache/erb-run.rb  
> > apache/rd2html.rb apache/ruby-debug.rb apache/eruby-debug.rb  
> > auto-reload.rb; do   
> > /usr/bin/install -c -m 644  
> > /private/tmp/ruby/mod\_ruby-1.0.7/lib/$file /usr/local/lib/ruby/1.8/$file;   
> > done
> > 
> > …
> > 
> > [local/apache/logs] root# cat error\_log  
> > dyld: /usr/local/apache/bin/httpd Undefined symbols:  
> > \_rb\_cObject  
> > \_rb\_check\_type  
> > \_rb\_data\_object\_alloc  
> > \_rb\_define\_class\_under  
> > \_rb\_define\_method  
> > \_rb\_define\_module  
> > \_rb\_define\_singleton\_method  
> > \_rb\_define\_virtual\_variable  
> > \_rb\_eStandardError  
> > \_rb\_eval\_string\_wrap  
> > \_rb\_file\_open  
> > \_rb\_funcall  
> > \_rb\_gc\_mark  
> > \_rb\_global\_variable  
> > \_rb\_intern  
> > \_rb\_io\_close  
> > \_rb\_io\_gets  
> > \_rb\_protect  
> > \_rb\_provide  
> > \_rb\_raise  
> > \_rb\_set\_kcode  
> > \_rb\_stdin  
> > \_rb\_str2cstr  
> > \_rb\_str\_cat  
> > \_rb\_str\_freeze  
> > \_rb\_str\_new  
> > \_rb\_str\_new2  
> > \_re\_mbctab  
> > \_ruby\_debug  
> > \_ruby\_show\_version  
> > \_ruby\_top\_self  
> > \_ruby\_verbose  
> > \_ruby\_xmalloc
> > 
> > –  
> > (-, /\ / / //

---

<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:** [22 January 2004 02:49 UTC](https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788/3 "2004-01-22T02:49:58Z")

</div>

Gavin Kistner [gavin@refinery.com](mailto:gavin@refinery.com) wrote in message news:\<GoEPb.118161$xy6.376643@attbi\_s02\>…

> All day I have been trying to get mod\_ruby and eRuby installed on MacOS  
> X 10.3 (Panther) with Apache 1.3.  
> I’m close, but not yet there.

I had exactly the same problem the other day, and got enough help on  
this newsgroup to solve it. Look back a couple days and you should  
see the thread.

Basically there’s 2 things you need to do: one is to configure ruby  
and eRuby with --enable-shared, and mod\_ruby with --with-apxs.

The second thing is that you’ll probably need a newer mod\_ruby, as the  
current stable version has some problems on OS X. I ended up using  
the latest dev version (1.1.2 I think) and it’s working fine.

Good luck…

Kevin

---

<div class="post-metadata">

**Author:** ![Gavin\_Kistner2](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gavin\_Kistner2](https://rubytalk.org/u/Gavin_Kistner2)\
**Post date:** [22 January 2004 03:09 UTC](https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788/4 "2004-01-22T03:09:58Z")

</div>

Gennady wrote:

> 1. Run configure with option “–enable-shared” where appropriate.
> 2. Get mod\_ruby version 1.1.1 (development), 1.0.7 is known to have  
> problems on Mac OS X.
> 
> Gennady.

Thanks muchly!

I haven’t tried the --enabled-shared option yet (will have to read about  
it) but getting the latest dev version (which is now 1.1.2) it worked  
perfectly!

---

<div class="post-metadata">

**Author:** ![Gavin\_Kistner2](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@Gavin\_Kistner2](https://rubytalk.org/u/Gavin_Kistner2)\
**Post date:** [22 January 2004 03:14 UTC](https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788/5 "2004-01-22T03:14:58Z")

</div>

Kevin M wrote:

> > All day I have been trying to get mod\_ruby and eRuby installed on MacOS  
> > X 10.3 (Panther) with Apache 1.3.  
> > I’m close, but not yet there.
> 
> I had exactly the same problem the other day, and got enough help on  
> this newsgroup to solve it. Look back a couple days and you should  
> see the thread.
> 
> Basically there’s 2 things you need to do: one is to configure ruby  
> and eRuby with --enable-shared, and mod\_ruby with --with-apxs.

Heh, thanks. I seem to have learned about this newsgroup 1 day too late.  
Should have searched first 😕

Neither of the install docs I read:  
[http://modruby.net/doc/install.en.html](http://modruby.net/doc/install.en.html)  
[http://sean.chittenden.org/programming/ruby/mod\_ruby/apachecon-2002/mod\_ruby\_intro.html](http://sean.chittenden.org/programming/ruby/mod_ruby/apachecon-2002/mod_ruby_intro.html)  
mention the --enable-shared option. I can’t seem to find information  
about it online (that actually describes it).

What does it do? And do I want it on both eRuby and mod\_ruby, or only eRuby?

> The second thing is that you’ll probably need a newer mod\_ruby, as the  
> current stable version has some problems on OS X. I ended up using  
> the latest dev version (1.1.2 I think) and it’s working fine.

Yup, mine too. Yay!

---

<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:** [22 January 2004 19:25 UTC](https://rubytalk.org/t/trouble-installing-eruby-on-macos-x-10-3/9788/6 "2004-01-22T19:25:00Z")

</div>

> What does it do? And do I want it on both eRuby and mod\_ruby, or only eRuby?

Um, I’m afraid I don’t really know either – I was just following the  
tips from this group and found that it worked. Do let us know if you  
find out 🙂

Kevin
