Trouble installing eRuby on MacOS X 10.3

G

Gavin Kistner

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
 
G

Gennady

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 said:
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
 
K

Kevin M

Gavin Kistner said:
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
 
G

Gavin Kistner

Gennady said:
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!
 
G

Gavin Kistner

Kevin said:
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://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!
 
K

Kevin M

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top