-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby ocra LoadError Exception - net/ssh #171
Comments
I've got the same problem, trying to crawl through a webpage with watir but got the openssl.so LoadError. When i launch script directly it works ok but not when it's the exe created by ocra Ruby 2.7.2 windows 10 1803 |
This took me also a few hours to resolve. I had to add I have no idea how it is possible to map the various '.so' libraries from mingw to the ruby builtin dlls. I ended up in guestimating the correct ones for each LoadError. |
SolutionUse optional command to include all ruby_builtin_dlls so it doesn't confuse me.
moreRemind me if any solutions to hide Ruby black window |
Depending on the SSL gem, you might also need to add --dll ruby_builtin_dlls\libcrypto-1_1-x64.dll if you are getting openssl.so errors |
@roboyeti thank you! That fixed the openssl.so load error for me, however now I have an error telling me that it is "unable to get local issuer certificate". Any ideas? |
I was looking at ruby packer and it has a default option for openssl cert directory to use, leading me to believe that is probably the direct to look into. Don't know yet where that is expected in Windows. https://github.com/pmq20/ruby-packer#the---openssl-dir-option |
@Coding-Cactus maybe try putting your pem into /ssl/certs/ PS C:\Users\roboy\wth> irb Also, the ENV var, SSL_CERT_FILE & SSL_CERT_DIR should provide openssl with a clue where to look for certs. Let me know if any of that helps, since I will be running into the same issue not far down the road. |
@roboyeti same error unfortunately 😢 |
Oh ... maybe try adding the ssl cert directory to ocra...? --gem-file As far as the ruby in the exe is concerned, the original ruby install dir doesn't exist, so openssl has no idea where the certs are. Not sure if that will work, but suspect that might be the problem. |
Yay adding |
@Coding-Cactus Awesome! I am so glad to hear that it worked for you and thank you for testing it, so now I know it will work for me! |
So i was trying to build a standalone .exe from my ruby script with ocra:
When i try to build the executable with ocra using the command
ocra --dll ruby_builtin_dlls\libssp-0.dll --console --no-autoload --add-all-core test.rb
i get following output:Ocra tells me that the executable has been created Successfully, but when i try to execute it i get this output:
I am very confused because i cannot pin down the problem. It seems that it cannot load net-ssh(https://github.com/net-ssh/net-ssh) and openssl.so(?), but why?
i am on Windows 10, installed Ruby using the RubyInstaller. and installed the gems with
gem install ocra
andgem install net-ssh
.The Program runs fine when executed with the Ruby interpreter.
I tried it on two different Machines with fresh Ruby Installments with no Success.
I've tried various ocra build commands, all resulting in the same error.
Maybe someone here can help me and tell me what i am doing wrong?
The text was updated successfully, but these errors were encountered: