How to solve 'libcurl' not found with Rails on Windows
Answer that worked for me (W10/Ruby2.6.0) was:
- Download cURL from the following URL: https://curl.haxx.se/windows/ (I chose 64bit because that's the system I'm using)
- Go into the archive and browse to
/bin
- Locate
libcurl_x64.dll
(it may be justlibcurl.dll
) - Extract to your local drive
- Rename it to
libcurl.dll
if it has the_x64
suffix - Cut + paste the file into the
/bin
directory of your Ruby installation
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
)- I just put it under
\ruby24\bin\
- Maybe for you it's
C:\Ruby24-x64\bin
(Here are things I tried that didn't work:)
- Putting on the
PATH
: thecygcurl-4.dll
obtained from the current Curl Download Wizard - Renaming the above
cygcurl-4.dll
tolibcurl.dll
and putting it on thePATH
- Installing the
msys2
packagelibcurl-devel 7.57.0-1
- Renaming the
msys-curl-4.dll
(frommsys2
found atmsys64\usr\bin
) tolibcurl.dll
I didn't try building curl / libcurl from the latest source because I already have the latest according to
pacman -Ss libcurl
:
msys/libcurl 7.57.0-1 (libraries) [installed]Multi-protocol file transfer library (runtime)msys/libcurl-devel 7.57.0-1 (development) [installed]Libcurl headers and libraries
More details about this in these other questions:
I 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