This is giving me a headache. I'm continuing a Rails project that started on Linux and I keep getting this when I run Puma on Ruby Mine:
Error:[rake --tasks] DL is deprecated, please use Fiddle
rake aborted!
LoadError: Could not open library 'libcurl': The specified module could not be found.
Could not open library 'libcurl.dll': The specified module could not be found.
Could not open library 'libcurl.so.4': The specified module could not be found.
Could not open library 'libcurl.so.4.dll': The specified module could not be found.
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/ffi-1.9.14-x86-mingw32/lib/ffi/library.rb:147:in `block in ffi_lib'
[...]
Now, what have I tried?
- I installed Puma successfully on Windows following this steps
- I downloaded
curl-7.50.1-win32-mingw
and put it on "C:/curl" - I added C:/curl/bin and C:/curl/include to PATH
- I installed successfully curb gem with
gem install curb --platform=ruby -- --with-curl-lib=C:/curl/bin --with-curl-include=C:/curl/include
- I put the .dll files in Ruby bin folder, installed the certificate in curl/bin and even run the curl.exe just in case.
I rebooted the machine but I keep seeing the same error.
I do not know what to do. How to successfully install libcurl on Windows for use with Rails
Answer that worked for me (W10/Ruby2.6.0) was:
/bin
libcurl_x64.dll
(it may be justlibcurl.dll
)libcurl.dll
if it has the_x64
suffix/bin
directory of your Ruby installationI had the same issue and tried the same steps that OP has listed. After breaking my head, cursing the existence of windows for some time and almost convincing the client to shift to a nix server I figured the libcurl.dll that I downloaded from https://curl.haxx.se/ (as suggested in all related posts) was corrupt.
Downloaded the one provided here http://www.dlldownloader.com/libcurl-dll/ and viola the ffi was able to load this one.
Hope this helps anyone else facing this issue
For anyone running Ruby 2.5 on Windows, my solution was similar to the top solutions however I had to move it to place the file in both the \bin folder and \bin\ruby_builtin_dlls folder to work.
Some other things is that I downloaded the 64bit version and changed its name to libcurl.dll. Also make sure to restart your IDE/terminal and then try to start the server again.
I want to use wpscan, but i get libcurl error OK, if you also get the same error, then in a very easy way I will try to give the solution.
Just copy the libcurl.dll file to system32 if your windows is 32 bit,
If your windows 64 bit copied to syswo64.
Good luck.
Well, the issue is caused by a missing lib as said in the error, So the solution is to download the lib here: http://www.dlldownloader.com/libcurl-dll/ and navigate to the ruby folder under bin and drop it there make sure to rename the downloaded .dll file to this exact one: libcurl.dll else won't work even after.
I just had the same problem on Windows 7 x64 and answered about it here. (Similar to you, I tried a lot of things that I thought should work but didn't.)
What worked was:
To take a
libcurl.dll
from one of the packages found here, https://curl.haxx.se/download.html#Win64, and put it on thePATH
.(Link was updated, but originally pointed to version
7.40
)\ruby24\bin\
C:\Ruby24-x64\bin
(Here are things I tried that didn't work:)
PATH
: thecygcurl-4.dll
obtained from the current Curl Download Wizardcygcurl-4.dll
tolibcurl.dll
and putting it on thePATH
msys2
packagelibcurl-devel 7.57.0-1
msys-curl-4.dll
(frommsys2
found atmsys64\usr\bin
) tolibcurl.dll
More details about this in these other questions:
jekyll serve dependency error - Could not open 'lib curl'
Typhoeus Windows installation
Rails Typhoeus Curl Trouble
how to install libcurl on windows 7 64bit