Skip to main content

openssl load error


If you found any payment issue due to openssl (like require 'openssl' fails) then you have to be very careful.

Exact error might be:

LoadError: no such file to load -- openssl


This error occurred because you have installed your ruby without openssl support. So first install openssl then install ruby with openssl support. 

If you still getting the error then you can follow the steps:

1. Check whether the openssl package is installed, if not please use 'yum install openssl'
2. Still the issue not solved then install openssl-dev, also make sure the library 'libruby' is installed 
3. Still the issue not solved then check the ruby lib has the directory called  'openssl' 
Note: In my server, the ruby lib is located at: /usr/local/lib/ruby/1.8/, better you can search the exact ruby's lib through 'whereis ruby' command
4. If openssl directory is not in your ruby lib then possibly you might get the openssl load error, then you can follow  the simple steps:
  a) copy openssl directory from any one of your other servers which is processing the 'openssl' and 'payment' things successfully
  b) Then try 'require openssl' in your irb environment, If you get any "openssl.so" error, then search the file "openssl.so" and make a symbolic link to the x86_64-linux directory, if the file is not in your system then    simply copy the openssl.so from other servers to 'x86_64-linux'  that is /usr/local/lib/ruby/1.8/x86_64-linux'
5. Don't forget to restart your server (not only the web servers)

Comments

Popular posts from this blog

Errno::ENOENT: No such file or directory

HTML to PDF conversion is very easy in rails and pdfkit will be useful in this case, wkhtmltopdf tool will be supporting tool so you can easily convert an html to pdf.  In my experience I used the following steps: gem install pdfkit -v 0.5.0 gem install wkhtmltopdf -v 0.1.2 gem install wkhtmltopdf-binary Some times this sequence will not work, so I use the following as per the instruction from  https://github.com/pdfkit/pdfkit/wiki/Installing-WKHTMLTOPDF Be careful to download the appropriate wkhtmltopdf tar ball, it depends on your os architecture, like i386 or 64 wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2 tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2 mv wkhtmltopdf-amd64 /usr/local/bin/wkhtmltopdf chmod +x /usr/local/bin/wkhtmltopdf Try to convert html to pdf after restarting your web servers.  If you get any error like: Errno::ENOENT: No such file or directory then I have a str...

Redis & nginx configuration for websocket/actionCable

Start redis server => redis-server redis console => redis-cli view available databases => config get databases pubsub channels global* pubsub channels global_notification_2 pubsub channels global_notification pubsub channels * => Lists all the available channels pubsub numsub global_notification_2 => returns the number of subscribers From unix command line directly redis-cli PUBSUB CHANNELS redis-cli PUBSUB NUMSUB global_notification_2 [root@api prod-openmednet-api]# redis-cli PUBSUB CHANNELS 1) "_action_cable_internal" 2) "global_notification_2" [root@api prod-openmednet-api]# redis-cli PUBSUB CHANNELS global_notification_2 1) "global_notification_2" [root@api prod-openmednet-api]# redis-cli PUBSUB NUMSUB global_notification_2 1) "global_notification_2" 2) (integer) 2 NGINX configuration:  worker_processes   auto; worker_rlimit_nofile 500000;  #=> refer RLIM...

Postgres points

Export sql data to file copy (select * from table-name) to '/tmp/cta.pl.list' in root dnf install postgresql-server postgresql-devel service postgresql start mkdir /home/pgdir chown postgres:postgres /home/pgdir -R chmod 777 /home/pgdir -R  su postgres initdb -D /home/pgdir pg_ctl -D /home/pgdir -l /home/pgdir/log start