shugo / mod_ruby

Embedding Ruby in the Apache web server
http://modruby.net/
BSD 2-Clause "Simplified" License
30 stars 8 forks source link

/usr/local/libexec/apache22/mod_ruby.so: Undefined symbol "rb_f_lambda" #5

Open limonene opened 10 years ago

limonene commented 10 years ago

I need help.

My OS is FreeBSD9.2-i386 root@suidar:/usr/local/etc/apache22 # uname -v FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 03:52:52 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC root@suidar:/usr/local/etc/apache22 #

apache22 root@suidar:/usr/local/etc/apache22 # httpd -v Server version: Apache/2.2.25 (FreeBSD) Server built: Aug 5 2013 09:21:21 root@suidar:/usr/local/etc/apache22 #

I installed apa22-mod_ruby,and configure httpd.conf from httpd.conf.mod_ruby

when I start apache,some error like this。 root@suidar:/usr/local/etc/apache22 # /usr/local/etc/rc.d/apache22 start Performing sanity check on apache22 configuration: httpd: Syntax error on line 107 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/mod_ruby.so into server: /usr/local/libexec/apache22/mod_ruby.so: Undefined symbol "rb_f_lambda" Starting apache22. httpd: Syntax error on line 107 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/mod_ruby.so into server: /usr/local/libexec/apache22/mod_ruby.so: Undefined symbol "rb_f_lambda" /usr/local/etc/rc.d/apache22: WARNING: failed to start apache22 root@suidar:/usr/local/etc/apache22 #

I googled, but didn`t find solution.

谁能帮帮我?谢谢~~~

94d90b08-c4ef-416c-bf7b-b6c5b7275e6a commented 8 years ago

Similar error, but
OS: CentOS 6.5
Ruby: ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
Apache: 2.2.15

But: request.c:1775: warning: implicit decleration of ‘rb_block_lambda’ (i translate warning message from russian)
Then i 'fix' it by replacing rb_block_lambda to rb_f_lambda in mod_ruby/request.c at 1775 string:) (As i see, limonene ignore warning) After replacing all works fine. So, as i think, it's about ruby version: some should use rb_block_lambda, but some rb_block_lambda.... PS: to install i use https://leeconomics.wordpress.com/2011/06/25/installing-ruby-1-9-and-mod_ruby-on-centos-5/ PPS: sorry for my english