Friday, July 4, 2008

Open SSL with Rails

Well I was recently working with one application and
had to configure SSL with it..
Initially I faced few problems like I was getting the following Error

no such file to load -- openssl then I searched a lot and
found the following solution

IT will be helpful to all who face the same problem or who
wants to configure Open SSL

install openssl:

./config --prefix=/usr/local --openssldir=/usr/local/ssl
make
make test
make install (as root)
./config shared --prefix=/usr/local --openssldir=/usr/local/ssl
make clean
make
make install (as root)
cd /usr/local/ssl/lib
cp * /usr/lib

To avoid getting the following error later when you compile OpenSSH:

configure: error: Your OpenSSL headers do
not match your library

copy all the SSL include files everywhere:

cd /home/tjnelson/openssl/openssl-*
cd include/openssl
cp * /usr/include
cp * /usr/local/ssl/include
cp * /usr/local/ssl/include/openssl

and then add /usr/local/ssl/lib to /etc/ld.so.conf and type

ldconfig

Then i returned to ruby-*/ext/openssl and ran:

ruby extconf.rb
make clean
make
make install

This method works perfectly

Dhaval Parikh
http://www.dhavalparikh.co.in

No comments: