284 could not be located in the dynamic link library SSLEAY32.dll - ruby

Postgres 8.3 is installed on a windows 2008 server.
Ruby 1.8-6 installed.
gem install ruby-postgres.
When trying a simple connect I get
ruby.exe - Ordinal Not Found
The ordinal 284 could not be located in the dynamic link library SSLEAY32.dll.
OK
There seems to be some conflict betweeen the ssleay32 shipped with postgres 8.3 and the ruby 1.8-6
I know I could use the gem postgres-pr but I would prefere to use the ruby-postgres because that is what I use on all my other setup even if most of them is running under linux and not windows.
So the question is, Have any one solved this and how?

Any even better solution, in so far as using the latest binaries for OpenSSL, is to rename both libeay32.dll and ssleay32.dll in both the ruby\bin folder and also the posgresql\lib folder and install the latest OpenSSL from http://www.slproweb.com/products/Win32OpenSSL.html, at the time of writing it was "Win32 OpenSSL v0.9.8j Light" put the dir in the path and away you go, it worked for me! You get the warm feeling of using the most up to date and secure OpenSSL libraries.

Miles Georgi
That is probably the best way to
start, but eventually you will want to
be using ruby-postgres instead. The
trick to getting that driver working
is to copy 2 dll files to your
c:\ruby\bin folder from your
C:\program files\posgresql\lib folder.
I think these 2 files are libeay32.dll
and ssleay32.dll
i think a different approch is to use trust instead of md5 from localhost. Because this need of ssleay should be somthing with authentication I suppose.

To get a minimal thing without doing to much stuff under windows.
use: gem install ruby-postgres
then install the windows version of pgadmin and use all the needed files from there
(cp from pgadmin\bin to ruby\bin or by setting PATH to the pgadmin\bin)

I've never touched ruby or postgres but you are using an old version of openssl than the one it is compiled against. The newest version is openssl-0.9.8j so to build that:
Download and unpack then using visual c++ 2008 express + active perl:
C:\openssl-0.9.8j>perl Configure VC-WIN32
C:\openssl-0.9.8j>ms\do_masm
C:\openssl-0.9.8j>nmake -f ms\ntdll.mak

Just copy the latest binaries for OpenSSL

Related

Problem with cygnetcdf-13.dll needed to use new versions of CDO with Cygwin

I have problems with the use of newest version CDO, like CDO-1.9.7.1.
This appears when I try tu use any CDO operator with Cygwin in windows 10:
"error while loading shared libraries: cygnetcdf-13.dll: cannot open shared object file: No such file or directory"
I have no problems with older versions of CDO (<= CDO-1.9.5).
Does anyone knows how to fix it and use the new versions of CDO in windows 10 with Cygwin, or other shell option in Windows?
Thank you very much!
Use cygcheck to find the proper package:
$ cygcheck -p cygnetcdf-13.dll
Found 4 matches for cygnetcdf-13.dll
libnetcdf13-4.6.0-1 - libnetcdf13: NetCDF (network Common Data Form)
libnetcdf13-4.6.1-1 - libnetcdf13: NetCDF (network Common Data Form)
libnetcdf13-4.6.1-2 - libnetcdf13: NetCDF (network Common Data Form)
netcdf-debuginfo-4.6.1-2 - netcdf-debuginfo: Debug info for netcdf
so you need to install the libnetcdf13 package.
If you need to look which programs are needed for it, there is
a proper line in
https://cygwin.com/packages/summary/libnetcdf13.html
depends: cygwin, libcurl4, libgcc1 (x86), libhdf5_101, libhdf5hl_100
I finally solved the problem. I had to install all the necessary packages through Cygwin's setup.exe. That is to say, every time a warning appears like "error while loading shared libraries: .dll: cannot open shared object file: No such file or directory" it should be looked for in setup.exe. If you can't find it, I recommend searching the web for the specific .dll and downloading it from the internet, to save it in the bin folder, for example: C: \ cygwin64 \ bin
Additionally, the cygeccodes.dll file (which comes with the CDO installer) must be moved to the same bin folder.
If there is a missing .dll associated with HDF5, I recommend installing all the packages that include that acronym in setup.exe, example: libhdf5_101
With this I was able to get all current versions of CDO working in Cygwin. After 3 days of looking for solutions, I am happy to have achieved it! I hope this helps you! :)

How to install ruby 2.1.2 on windows?

I didn't get any windows installer to install ruby 2.1.2. The only resource I found is a tar/zip file that is available at https://www.ruby-lang.org/en/downloads/.
I have no idea how to install this , anyone provide some suggestions how to install 2.1.2 version of ruby.
I have been able to crack the zlib nut (for Windows 8.1 -- see below), but I'm still struggling with openssl, readline, etc... I find it amazing that this documentation does not seem to be easily found, and that some experts/respondents advise using the 2.0 installer without considering that users are fighting this fight because we need the 2.1.2 functionality.
I downloaded zlib128-dll.zip from http://zlib.net and unzipped the contents to a directory (e.g., c:\zlib).
Then following some hints from this post (https://www.ruby-forum.com/topic/4421852), I created these dirs off of my c:\ruby-build\usr directory:
zlib
zlib\include
zlib\lib
Then I copied some files from my C:\zlib directories to my c:\ruby-build\usr directories:
*.h files (both) from C:\zlib\include to c:\ruby-build\usr\zlib\include
zdll.lib from C:\zlib\lib to c:\ruby-build\usr\zlib\lib.
zlib1.dll *AS* zlib.dll from C:\zlib to both c:\ruby-build\usr\zlib\lib and c:\ruby-build\usr\bin
(not sure which one or both are necessary).
Then from a VS 2012 Native Tools Command Window, I naviagted to C:\ruby-2.1.2\ext\zlib and executed:
\ruby-build\usr\bin\ruby extconf.rb --with-zlib-dir=c:/ruby-build/usr/zlib
Then nmake, followed by nmake install, and voila, I zlib was finally installed.
Let me know if you any questions about my steps.
The project Ruby Installer has published Ruby 2.1.3 for Windows (32 and 64 bits versions) on their download page:
http://rubyinstaller.org/downloads/
You will also find there a new build for Ruby 2.0 (p576).
Although they didn´t updated their news page yet.
The standard way to install Ruby on Windows is with Ruby Installer. However, due to some bugs/regressions in Ruby, there has been some hold up creating an installer for Ruby 2.1 on Windows. To get Ruby 2.1 on Windows, you'll likely have to compile from source.
That's a good question. It seems that 2.1.2 is not easily available on bitnami or ruby installer.
Check this out.
If it's not worth the pain or if you don't explicitly need the features of 2.1.2, I would recommend just installing 2.0.x's stable release.
Please let me know if you have any questions!

How to access svn repo using ruby in svn_wc

I am using svn_wc.
It gives err as no such file to load -- svn/core (LoadError)
what to do?
The above answer is a link only answer and can become useless when the link is dead. Dumping the link contents here -
SVN 1.5.1 / Ruby bindings on Windows
Rather than messing around with compiling swig bindings etc:
Download the ruby bindings from the svn site: (http://subversion.tigris.org/files/documents/15/43245/svn-win32-1.5.1_rb.zip)
From the zip - copy ruby\lib\svn into c:\ruby\lib\ruby\site_ruby\1.8\svn
From the zip – copy ruby\ext\svn\ext into c:\ruby\lib\ruby\site_ruby\1.8\svn\ext
copy libeay32.dll and ssleay32.dll from your subversion 1.5 directory into c:\ruby\bin
run irb and test with: require ‘svn/core’
Where can I find updated binaries? I've looked around on the
Subversion site, but there seems to be no link.
They are available on the subversion site here: svn-win32-1.5.5_rb.zip
If you go to the subversion site and select windows binaries for
apache 2.2 you will see the list.
I just over-wrote the two DLL files (libeay32 and ssleay32) that came
with my ruby 1.8.6 installation with the two that came with my svn
1.5.5 installation. (Yes, I saved the originals.)This was necessary to passing the "require 'svn/core'" test, but is this likely to have
broken something within ruby?
Hey Ramon, i'd hope not but you never know :) The dll's are OpenSSL
libraries so if you see any weird behaviour when using any ssl related
functionality in ruby, that'd probably be the culprit
Ruby can't find svn/core in your installation, if you look at the github page for svn_wc the requirements are listed as:
Requires that the Subversion (SWIG) Ruby Bindings are installed
Which is much easier to do on Linux and OSX than on Windows

Compile the most recent version of a package in an old system for local use

I need to know if it is possible to compile the best and newest package in an old, ancient system. Why? Well I'm limited at my company: I need to develop an application in an old Debian 3.0 server and I would prefer to use newer software to accomplish my task. Unfortunately, I'm not allowed to upgrade nor install any package.
Specifically, I want to parse XML files comfortably using xmlstarlet to do so. This server doesn't have it installed; if I download an older version of xmlstarlet supported by the system it's too old that I just lost the functionality I need. It just has three dependencies: libc6, libxml2 and libxslt1.1 (which are installed but are too ancient for a newer version of xmlstarlet)
So the question is: is there a way I can download this package and its dependencies (I think they are few and simple) and somehow compile them to work locally (not necessarily on the system's path, just in a working directory) without affecting in any way the legacy packages of the same name?
This system doesn't has PEAR either, nor PHP5, nor xmllint and I want to avoid coding in PHP4 to parse these XMLs. I really would like to work with xmlstarlet.
The answer to How to specify non-default shared-library path in GCC Linux? Getting "error while loading shared libraries" when running looks like it should work fine.
Or you could try static linking:
./configure --enable-static-libs

Installing Ruby 1.8.7 (and other stuff) manually

I don't want to rely on the one-click installer any more, and I want to learn how to install Ruby manually. Is there a resource for this?
Download the Windows binaries for Ruby 1.8.7 here: http://www.ruby-lang.org/en/downloads/. Extract that to wherever you would like; I use C:\ruby. Then put C:\ruby\bin in your PATH environment variable.
Download the zlib package: http://www.zlib.net/zlib123-dll.zip and extract the zlib1.dll, rename it to zlib.dll and move it into your Windows\System32.
Download the iconv package: http://sourceforge.net/project/showfiles.php?group_id=25167&package_id=51458. Find and extract the iconv.dll file into your Windows\System32.
Download the rubygems package and follow the instructions, basically extracting the package and running ruby setup.rb.
Verify that everything works properly by trying a gem install rails, once that installs then do: rails test_project
Well, if you're on a Mac I'd recommend MacPorts. There's a good post on it here that's still valid.
If you're on Windows and don't want to use the one-click installer you can install Cygwin and build ruby through it. Here's a post I found.
I'd start with the one-click installer, probably by taking a good look inside the source on RubyForge (disclaimer, I haven't actually done this...). These guys clearly know how to build Ruby on Windows from source, so I'd be inclined to see how they did it.
Beyond that, did you know you can download the 1.8.7 Windows binary from the ruby-lang.org downloads page? That page also has the current stable 1.8.7 source
You might also need libeay32.dll and ssleay32.dll, found in OpenSSL: http://www.slproweb.com/products/Win32OpenSSL.html
I've pretty much concluded that Ruby 1.8.7 just isn't stable yet for Windows. I was able to get it running on one Vista machine following the instructions above but not my laptop.
For the laptop I followed the following steps and everything seems to be working so far:
Install 1.8.6 using the 1-click
installer. Let it delete old copies
of Ruby if necessary.
Install gems 1.3.4
gem install rails
ruby script\console
point browser to http://localhost:3000/. Make sure everything works as expected
stop console
extract 1.8.7 zip file into the Ruby 1.8.6 directory
copy dll files discussed above into the ruby/bin directory
restart console and again check http://localhost:3000/
I would only follow these directions as a last resort if the instructions above don't work.
Before you wag a finger at me and scold me for this approach...
please consider that I spent ~8 hours reading and trying everything possible and was able to use the approach above successfully on another computer. I'm open to other suggestions!
If you are looking for a place to get all those DLL files - here is a trick: If you install the Ruby one-click-installer for Ruby 1.8.6, it has all of those DLL files in C:\ruby1.8.6\bin (assuming you installed it there).
I was playing with the PIK gem (rvm for Windows) and ran into that problem for Ruby 1.9.1 and after copying those DLL files everything worked perfectly.
Of course, those DLL files are somewhat old, so if Ruby 1.9.1 or 1.8.7 relies on any new features in those DLL files there might be a potential for a bug, but I haven't noticed anything so far and it beats hunting down them on the Internet.

Resources