1

I downloaded and installed Ruby 2.5.7-1 (x64) on a Windows 10 system from the following site:
https://rubyinstaller.org/downloads/

I then installed Rails and Bundler as follows:

gem install rails -v 5.2.3
gem install bundler

I then ran bundle install. This all worked fine.
However, after all that, when I try to run rails db:migrate or rails server, I get the following message:

rails 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:/path-to-app/config/application.rb:18:in `<top (required)>'
C:/path-to-app/Rakefile:4:in `require'
C:/path-to-app/Rakefile:4:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)

When I Google this error, everything seems to point to the following SO post and top answer:
How to solve 'libcurl' not found with Rails on Windows

I downloaded several versions of libcurl.dll, placed them in the C:\Ruby25-x64\bin directory, restarted the DB server, restarted my IDE with terminal, and tried again, but I still keep getting the same error.

I've also confirmed that C:\Ruby25-x64\bin is part of my user Path variable, but I'm still getting this issue.

Does anyone have any ideas on how I can resolve this, since the SO post linked above either doesn't work (or I'm not doing something that's obvious)? Thanks.

HartleySan
  • 7,404
  • 14
  • 66
  • 119
  • Have you checked whether the devkit has been installed? https://rubyinstaller.org/add-ons/devkit.html – 3DPrintScanner Nov 15 '19 at 15:55
  • Because it's Ruby >= 2.4, after Ruby is installed, it automatically opens a command prompt and runs the `ridk` command and installs a bunch of stuff. As such, I'm assuming that it's all installed, but not sure of how to confirm. – HartleySan Nov 15 '19 at 18:13
  • I have confirmed that I ran `ridk install` after the Ruby installation, and I just pressed Enter, which installed everything for options 1, 2 and 3. – HartleySan Nov 15 '19 at 18:16
  • Took a while, but I finally found a different `libcurl.dll` file that worked. Not sure why, but one particular one worked, but not the others. Once I found the "right" one and put it in the `bin` directory under the Ruby directory, it worked. – HartleySan Nov 16 '19 at 22:22

0 Answers0