install question RE:ruby-1.8.6, rubygems-1.2.0, rails, mongrel on redhat 4

I'm working to get Rails properly configured and running on a GNU/ Linux RedHat4 server. I've been through many, many of the online documentation sets, and am still stuck on a couple of things, namely running mongrel throws errors concerning openssl.

I've been through the cycle of using rpms, using gems, using source directly, and have made the most progress using source. I've managed to get ruby to "see" zlib, which was holding me back, for quite a while.

Here are my steps, as it stands today. I'd appreciate any assistance.

Here are my machine specs: uname -a Linux ???.???.??? 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:58:43 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

I compile ruby-1.8.6 this way: ./configure --with-openssl=/lib64 --with-zlib --with-readline=/usr/lib

I am reasonably sure that the --with-zlib works because this returns "success": ruby -rzlib -e "puts :success"

success

However, these don't work: ruby -ropenssl -e "puts :success"

ruby: no such file to load -- openssl (LoadError)

ruby -rreadline -e "puts :success"

ruby: no such file to load -- readline (LoadError)

I also followed steps to manually compile the ext/openssl directory: ruby extconf.rb

=== OpenSSL for Ruby configurator === === Checking for system dependent stuff... === checking for t_open() in -lnsl... no checking for socket() in -lsocket... no checking for assert.h... yes === Checking for required stuff... === checking for openssl/ssl.h... no === Checking for required stuff failed. === Makefile wasn't created. Fix the errors above.

Here is the contents of the mkmf.log found under ext/openssl: ***** BEGIN mkmf.log ***** have_library: checking for t_open() in -lnsl... -------------------- no

"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -g - O2 conftest.c -L'/usr/local/lib' -Wl,-R'/\usr/local/lib' -rdynamic - Wl,-export-dynamic -lruby-static -lnsl -ldl -lcrypt -lm -lc" conftest.c: In function `t': conftest.c:3: error: `t_open' undeclared (first use in this function) conftest.c:3: error: (Each undeclared identifier is reported only once conftest.c:3: error: for each function it appears in.) checked program was: /* begin */ 1: /*top*/ 2: int main() { return 0; } 3: int t() { void ((*volatile p)()); p = (void ((*)()))t_open; return 0; } /* end */

"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -g - O2 conftest.c -L'/usr/local/lib' -Wl,-R'/\usr/local/lib' -rdynamic - Wl,-export-dynamic -lruby-static -lnsl -ldl -lcrypt -lm -lc" /tmp/ccK5K10B.o(.text+0x17): In function `t': /root/ruby-1.8.6/ext/openssl/conftest.c:3: undefined reference to `t_open' collect2: ld returned 1 exit status checked program was: /* begin */ 1: /*top*/ 2: int main() { return 0; } 3: int t() { t_open(); return 0; } /* end */

I don't know redhat at all, but on debian based distributions, something that often trips people up is that the headers for various libraries are in a separate package from the library itself (ie there will be a libfoo package and then a libfoo-dev package).

Fred

Unfortunately, I have not found *-devel source for openssl.

I have made some progress, but have run into further problems, down the road.

The problem I solved involves the GNU Linker. Unfortunately, the problem that I created involves the GNU Linker, as well.

I've modified the Makefile files in: ext/digest/md5 ext/digest/rmd160 ext/digest/sha1 /ext/openssl

The change is to remove references to .a files, found in the LIBS variable: -lcrypt -lcrypto -lssl

and hand-add the literal references to .so files (one example - the openssl makefile): $(RUBYARCHDIR)/$(DLLIB): $(OBJS)         @-$(RM) $@         @-$(MAKEDIRS) $(@D)         $(LDSHARED) $(DLDFLAGS) $(LIBPATH) -o /lib64/libcrypto.so.4 - o /lib64/libcrypt.so.1 -o /lib64/libssl.so.4 -o $@ $(OBJS) $ (LOCAL_LIBS) $(LIBS)

This allows the following commands, run from ~/ruby-1.8.6 to execute without returning an error: make make install

However, the openssl library is still not found: ruby -ropenssl -e "puts :success" /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so: /usr/local/lib/ruby/ 1.8/x86_64-linux/openssl.so: undefined symbol: d2i_PKCS7_SIGNER_INFO - /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so (LoadError)         from /usr/local/lib/ruby/1.8/openssl.rb:17

...and the launch of the web server still fails: ruby -d script/server Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb: 772 - no such file to load -- rubygems/defaults/operating_system /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:241: warning: `&' interpreted as argument prefix /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/ gem_dependency.rb:32: warning: `*' interpreted as argument prefix Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem builder (~> 2.1.2)

Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem xml-simple (~> 1.0.11)

Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem memcache-client (~> 1.5.0)

Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem tzinfo (~> 0.3.8)

Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27 - no such file to load -- Win32API Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - no such file to load -- Win32API Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- fast_xs Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- fast_xs Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- utf8proc_native Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- utf8proc_native Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such file to load -- utf8proc_native Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/core_ext/kernel/requires.rb:19 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- mongrel Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ mongrel-1.1.5/lib/mongrel/gems.rb:7 - no such file to load -- mongrel_experimental Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem mongrel_experimental (>= 1.1.5)

=> Booting Mongrel (use 'script/server webrick' to force WEBrick) Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/cache Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/pids Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/sessions Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/sockets => Rails 2.1.0 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:188: warning: instance variable @host not initialized /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:188: warning: instance variable @includes not initialized ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ rails.rb:135: warning: instance variable @rails_handler not initialized /home/m31451/project/test/config/boot.rb:8: warning: method redefined; discarding old boot! /home/m31451/project/test/config/boot.rb:15: warning: method redefined; discarding old booted? /home/m31451/project/test/config/boot.rb:19: warning: method redefined; discarding old pick_boot /home/m31451/project/test/config/boot.rb:23: warning: method redefined; discarding old vendor_rails? /home/m31451/project/test/config/boot.rb:27: warning: method redefined; discarding old preinitialize /home/m31451/project/test/config/boot.rb:31: warning: method redefined; discarding old preinitializer_path /home/m31451/project/test/config/boot.rb:37: warning: method redefined; discarding old run /home/m31451/project/test/config/boot.rb:44: warning: method redefined; discarding old load_initializer /home/m31451/project/test/config/boot.rb:51: warning: method redefined; discarding old load_initializer /home/m31451/project/test/config/boot.rb:57: warning: method redefined; discarding old load_rails_gem /home/m31451/project/test/config/boot.rb:69: warning: method redefined; discarding old rubygems_version /home/m31451/project/test/config/boot.rb:73: warning: method redefined; discarding old gem_version /home/m31451/project/test/config/boot.rb:83: warning: method redefined; discarding old load_rubygems /home/m31451/project/test/config/boot.rb:96: warning: method redefined; discarding old parse_gem_version /home/m31451/project/test/config/boot.rb:101: warning: method redefined; discarding old read_environment_rb /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ validations.rb:284: warning: `*' interpreted as argument prefix /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ callbacks.rb:187: warning: `*' interpreted as argument prefix /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ connection_adapters/abstract/connection_specification.rb:41: warning: method redefined; discarding old allow_concurrency= Exception `LoadError' at /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so:0 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/ digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ rails-2.1.0/lib/initializer.rb:225 - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/ 1.8/x86_64-linux/digest/md5.so Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:505 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exiting Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb: 225:in `require_frameworks': /usr/local/lib/ruby/1.8/x86_64-linux/ digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/ x86_64-linux/digest/md5.so (RuntimeError)         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb:113:in `process'         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb:93:in `send'         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb:93:in `run'         from /home/m31451/project/test/config/environment.rb:13         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require'         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require'         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:509:in `require'         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:354:in `new_constants_in'          ... 22 levels...         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ commands/server.rb:39         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require'         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require'         from script/server:3

I believe that I have essentially "pushed the linking problem up the chain," rather than fixing it.

I believe that the proper fix is to modify the arguments to: ruby-1.8.6 % ./configure <arguments here> so that the Makefiles for each directory "do the right thing" and work solely with 64-bit shared object files. I've looked at the configure script, and found it to be autogenerated by GNU Autoconf. There are a few spots in the file that appear to be related to library settings, but the format does not lend itself to easy analysis.

Just an update.

Unfortunately, I have not found *-devel source for openssl.

Where are your openssl headers? Maybe you just need to tell ruby where
they are (when you build the openssl ruby library)

Fred

I believe my openssl headers are here: ls -1 /usr/local/include/openssl aes.h asn1.h asn1_mac.h asn1t.h bio.h blowfish.h bn.h buffer.h cast.h comp.h conf_api.h conf.h crypto.h des.h des_old.h dh.h dsa.h dso.h dtls1.h ebcdic.h ecdh.h ecdsa.h ec.h engine.h e_os2.h err.h evp.h hmac.h idea.h krb5_asn.h kssl.h lhash.h md2.h md4.h md5.h objects.h obj_mac.h ocsp.h opensslconf.h opensslv.h ossl_typ.h pem2.h pem.h pkcs12.h pkcs7.h pq_compat.h pqueue.h rand.h rc2.h rc4.h ripemd.h rsa.h safestack.h sha.h ssl23.h ssl2.h ssl3.h ssl.h stack.h store.h symhacks.h tls1.h tmdiff.h txt_db.h ui_compat.h ui.h x509.h x509v3.h x509_vfy.h

I call configure this way: ./configure --with-openssl=/usr/local/include/openssl --with-zlib make # above make invocation fails because I need to hand-modify the Makefiles for: # ext/digest/md5 # ext/digest/rmd160 # ext/digest/sha1 # ext/openssl # I modify these Makefiles to look for .so files rather than .a files for crypt and crypto libraries, and the make succeeds make install

Unfortunately, ruby still cannot find openssl: ruby -ropenssl -e "puts :success" /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so: /usr/local/lib/ruby/ 1.8/x86_64-linux/openssl.so: undefined symbol: d2i_PKCS7_SIGNER_INFO - /usr/local/lib/ruby/1.8/x86_64-linux/openssl.so (LoadError)         from /usr/local/lib/ruby/1.8/openssl.rb:17

...and the web server fails to run: ruby -d script/server Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb: 772 - no such file to load -- rubygems/defaults/operating_system/usr/ local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:241: warning: `&' interpreted as argument prefix /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/rails/ gem_dependency.rb:32: warning: `*' interpreted as argument prefix Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem builder (~> 2.1.2)

Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem xml-simple (~> 1.0.11)

Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem memcache-client (~> 1.5.0)

Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem tzinfo (~> 0.3.8)

Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27 - no such file to load -- Win32API Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - no such file to load -- Win32API Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- fast_xs Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- fast_xs Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- utf8proc_native Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- utf8proc_native Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such file to load -- utf8proc_native Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:34 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/core_ext/kernel/requires.rb:19 - no such file to load -- fcgi Exception `MissingSourceFile' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems/custom_require.rb:27 - no such file to load -- mongrel Exception `MissingSourceFile' at /usr/local/lib/ruby/gems/1.8/gems/ mongrel-1.1.5/lib/mongrel/gems.rb:7 - no such file to load -- mongrel_experimental Exception `Gem::LoadError' at /usr/local/lib/ruby/site_ruby/1.8/ rubygems.rb:578 - Could not find RubyGem mongrel_experimental (>= 1.1.5)

=> Booting Mongrel (use 'script/server webrick' to force WEBrick) Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/cache Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/pids Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/sessions Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - /home/m31451/project/test/tmp/sockets => Rails 2.1.0 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:188: warning: instance variable @host not initialized /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:188: warning: instance variable @includes not initialized ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ rails.rb:135: warning: instance variable @rails_handler not initialized /home/m31451/project/test/config/boot.rb:8: warning: method redefined; discarding old boot! /home/m31451/project/test/config/boot.rb:15: warning: method redefined; discarding old booted? /home/m31451/project/test/config/boot.rb:19: warning: method redefined; discarding old pick_boot /home/m31451/project/test/config/boot.rb:23: warning: method redefined; discarding old vendor_rails? /home/m31451/project/test/config/boot.rb:27: warning: method redefined; discarding old preinitialize /home/m31451/project/test/config/boot.rb:31: warning: method redefined; discarding old preinitializer_path /home/m31451/project/test/config/boot.rb:37: warning: method redefined; discarding old run /home/m31451/project/test/config/boot.rb:44: warning: method redefined; discarding old load_initializer /home/m31451/project/test/config/boot.rb:51: warning: method redefined; discarding old load_initializer /home/m31451/project/test/config/boot.rb:57: warning: method redefined; discarding old load_rails_gem /home/m31451/project/test/config/boot.rb:69: warning: method redefined; discarding old rubygems_version /home/m31451/project/test/config/boot.rb:73: warning: method redefined; discarding old gem_version /home/m31451/project/test/config/boot.rb:83: warning: method redefined; discarding old load_rubygems /home/m31451/project/test/config/boot.rb:96: warning: method redefined; discarding old parse_gem_version /home/m31451/project/test/config/boot.rb:101: warning: method redefined; discarding old read_environment_rb /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ validations.rb:284: warning: `*' interpreted as argument prefix /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ callbacks.rb:187: warning: `*' interpreted as argument prefix /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ connection_adapters/abstract/connection_specification.rb:41: warning: method redefined; discarding old allow_concurrency= Exception `LoadError' at /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so:0 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/ digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:34 - /usr/local/lib/ruby/1.8/x86_64-linux/digest/ md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so Exception `LoadError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ rails-2.1.0/lib/initializer.rb:225 - /usr/local/lib/ruby/1.8/x86_64- linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/ 1.8/x86_64-linux/digest/md5.so Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:505 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so Exiting Exception `RuntimeError' at /usr/local/lib/ruby/gems/1.8/gems/ activesupport-2.1.0/lib/active_support/dependencies.rb:512 - /usr/ local/lib/ruby/1.8/x86_64-linux/digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/x86_64-linux/digest/md5.so /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb: 225:in `require_frameworks': /usr/local/lib/ruby/1.8/x86_64-linux/ digest/md5.so: undefined symbol: MD5_Init - /usr/local/lib/ruby/1.8/ x86_64-linux/digest/md5.so (RuntimeError)         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb:113:in `process'         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb:93:in `send'         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ initializer.rb:93:in `run'         from /home/m31451/project/test/config/environment.rb:13         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require'         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require'         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:509:in `require'         from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/ active_support/dependencies.rb:354:in `new_constants_in'          ... 22 levels...         from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/ commands/server.rb:39         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `gem_original_require'         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:27:in `require'         from script/server:3

I am now focused on the ext/openssl directory, which has some warnings in its own individual make: cd ext/openssl make clean make gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509req.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_config.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_pkcs7.c ossl_pkcs7.c: In function `ossl_pkcs7si_new': ossl_pkcs7.c:90: warning: passing arg 2 of `ASN1_dup' from incompatible pointer type ossl_pkcs7.c: In function `DupPKCS7SignerPtr': ossl_pkcs7.c:103: warning: passing arg 2 of `ASN1_dup' from incompatible pointer type ossl_pkcs7.c: In function `ossl_pkcs7ri_new': ossl_pkcs7.c:116: warning: passing arg 2 of `ASN1_dup' from incompatible pointer type ossl_pkcs7.c: In function `DupPKCS7RecipientPtr': ossl_pkcs7.c:129: warning: passing arg 2 of `ASN1_dup' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_pkcs12.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_engine.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_pkey_dh.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509store.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509cert.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509attr.c ossl_x509attr.c: In function `ossl_x509attr_initialize': ossl_x509attr.c:100: warning: passing arg 2 of `d2i_X509_ATTRIBUTE' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_ns_spki.c ossl_ns_spki.c: In function `ossl_spki_initialize': ossl_ns_spki.c:67: warning: passing arg 2 of `d2i_NETSCAPE_SPKI' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_hmac.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_rand.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_pkey_rsa.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_ssl.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_asn1.c ossl_asn1.c: In function `decode_bool': ossl_asn1.c:313: warning: passing arg 2 of `d2i_ASN1_BOOLEAN' from incompatible pointer type ossl_asn1.c: In function `decode_int': ossl_asn1.c:328: warning: passing arg 2 of `d2i_ASN1_INTEGER' from incompatible pointer type ossl_asn1.c: In function `decode_bstr': ossl_asn1.c:347: warning: passing arg 2 of `d2i_ASN1_BIT_STRING' from incompatible pointer type ossl_asn1.c: In function `decode_enum': ossl_asn1.c:373: warning: passing arg 2 of `d2i_ASN1_ENUMERATED' from incompatible pointer type ossl_asn1.c: In function `decode_null': ossl_asn1.c:390: warning: passing arg 2 of `d2i_ASN1_NULL' from incompatible pointer type ossl_asn1.c: In function `decode_obj': ossl_asn1.c:407: warning: passing arg 2 of `d2i_ASN1_OBJECT' from incompatible pointer type ossl_asn1.c: In function `decode_time': ossl_asn1.c:435: warning: passing arg 2 of `d2i_ASN1_TIME' from incompatible pointer type ossl_asn1.c: In function `ossl_asn1_get_asn1type': ossl_asn1.c:503: warning: cast to pointer from integer of different size ossl_asn1.c: In function `ossl_asn1_decode0': ossl_asn1.c:727: warning: passing arg 1 of `ASN1_get_object' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509ext.c ossl_x509ext.c: In function `ossl_x509ext_initialize': ossl_x509ext.c:285: warning: passing arg 2 of `d2i_X509_EXTENSION' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_cipher.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509crl.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509revoked.c ossl_x509revoked.c: In function `ossl_x509revoked_new': ossl_x509revoked.c:48: warning: passing arg 2 of `ASN1_dup' from incompatible pointer type ossl_x509revoked.c: In function `DupX509RevokedPtr': ossl_x509revoked.c:64: warning: passing arg 2 of `ASN1_dup' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_x509name.c ossl_x509name.c: In function `ossl_x509name_initialize': ossl_x509name.c:135: warning: passing arg 2 of `d2i_X509_NAME' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c openssl_missing.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_bio.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_digest.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_ocsp.c ossl_ocsp.c: In function `ossl_ocspreq_initialize': ossl_ocsp.c:114: warning: passing arg 2 of `d2i_OCSP_REQUEST' from incompatible pointer type ossl_ocsp.c: In function `ossl_ocspres_initialize': ossl_ocsp.c:321: warning: passing arg 2 of `d2i_OCSP_RESPONSE' from incompatible pointer type gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_bn.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_pkey.c gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H= \"extconf.h\" -fPIC -g -O2 -c ossl_pkey_dsa.c ossl_pkey_dsa.c: In function `ossl_dsa_initialize': ossl_pkey_dsa.c:141: warning: passing arg 1 of `PEM_ASN1_read_bio' from incompatible pointer type ossl_pkey_dsa.c:141: warning: passing arg 4 of `PEM_ASN1_read_bio' from incompatible pointer type ossl_pkey_dsa.c: In function `ossl_dsa_to_public_key': ossl_pkey_dsa.c:313: warning: passing arg 2 of `ASN1_dup' from incompatible pointer type gcc -shared -rdynamic -Wl,-export-dynamic -L'../..' -o /lib64/ libcrypto.so.4 -o /lib64/libcrypt.so.1 -o /lib64/libssl.so.4 - o ../../.ext/x86_64-linux/openssl.so ossl_x509req.o ossl_config.o ossl_pkcs7.o ossl_pkcs12.o ossl.o ossl_x509.o ossl_engine.o ossl_pkey_dh.o ossl_x509store.o ossl_x509cert.o ossl_x509attr.o ossl_ns_spki.o ossl_hmac.o ossl_rand.o ossl_pkey_rsa.o ossl_ssl.o ossl_asn1.o ossl_x509ext.o ossl_cipher.o ossl_x509crl.o ossl_x509revoked.o ossl_x509name.o openssl_missing.o ossl_bio.o ossl_digest.o ossl_ocsp.o ossl_bn.o ossl_pkey.o ossl_pkey_dsa.o -ldl - lm -lc

The Makefile under ext/openssl has the following values for architecture: arch = x86_64-linux sitearch = x86_64-linux

I wonder if these values are incorrect, somehow. uname -a Linux ???.???.??? 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:58:43 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

I resolved this problem. It did not involve the fact that the machine was 64-bit. I had to re-install openssl, before ruby would install well enough to run rails. Here are my steps.

[root@???]# uname -a Linux ???.???.??? 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686 i686 i386 GNU/Linux

#install openssl from source http://www.openssl.org/source/openssl-0.9.8h.tar.gz ./config shared make make test make install cp /usr/local/ssl/lib/libssl.so.0.9.8 /lib rm /lib/libssl.so.4 ln -s /lib/libssl.so.0.9.8 /lib/libssl.so.4 ldconfig

#install and configure zlib cd /apps tar xjvf zlib-1.2.3.tar.bz2 ./configure --shared make make test make install vi /etc/ld.so.conf.d/zlib-1.2.3.conf #insert the value, /usr/local/lib, in the file, on a single line ldconfig cp /apps/zlib-1.2.3/zutil.h /usr/local/include cp /apps/zlib-1.2.3/zutil.c /usr/local/include

#install ruby cd /apps/ruby-1.8.6 make clean ./configure --prefix=/usr --with-openssl-dir=/usr/local/ssl --with- openssl-include=/usr/lo\cal/ssl/include make make test make install

#install rubygems cd /apps/rubygems-1.2.0 ruby setup.rb

#update your gems gem update gem install rails

#run a basic rails server to verify that it works cd /apps mkdir test rails /apps/test cd /apps/test script/server

# open a browser to localhost:3000 to verify the WebBrick rails server is running

# installing gems for mongrel... gem install activesupport gem install activerecord gem install actionpack gem install actionmailer gem install activeresource gem install gem_plugin gem install rails gem install daemons gem install fastthread gem install cgi_multipart_eof_fix gem install mongrel

# running mongrel... cd /apps/test mongrel_rails start

Finally got it

http://markmail.org/message/fiw7dupsgejaqvui michael_teter had the answer cd into ruby-1.8.7.../ext/openssl AFTER installing Ruby THEN ruby extconf.rb --with-openssl-include=/usr/local/ssl/include --with-openssl-lib=/usr/local/ssl/lib make sudo make install

then start using Ruby