How to solve 'libcurl' not found with Rails on Windows How to solve 'libcurl' not found with Rails on Windows windows windows

How to solve 'libcurl' not found with Rails on Windows


Answer that worked for me (W10/Ruby2.6.0) was:

  1. Download cURL from the following URL: https://curl.haxx.se/windows/ (I chose 64bit because that's the system I'm using)
  2. Go into the archive and browse to /bin
  3. Locate libcurl_x64.dll (it may be just libcurl.dll)
  4. Extract to your local drive
  5. Rename it to libcurl.dll if it has the _x64 suffix
  6. 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 the PATH.

    (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: the cygcurl-4.dll obtained from the current Curl Download Wizard
  • Renaming the above cygcurl-4.dll to libcurl.dlland putting it on the PATH
  • Installing the msys2 package libcurl-devel 7.57.0-1
  • Renaming the msys-curl-4.dll (from msys2 found at msys64\usr\bin) to libcurl.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