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.