Eric Guo's blog.cloud-mes.com

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

How to Install Gem Curb in Windows

Permalink

After read the post in Ruby-China say how to use mechanize and curl to login Ruby-China, I decide to install curb, seems still a little tricky.

First download last available libcurl in windows, which currently is 7.40.0.

Notice most up-to-date version curl-7.47.1-win32-mingw not working, so still using 7.40.0.

Extract to C:\ and install the curb via below command.

gem install curb --platform=ruby -- --with-curl-lib=C:/curl-7.40.0-devel-mingw32/bin --with-curl-include=C:/curl-7.40.0-devel-mingw32/include

Some relative issues in github about curb, #37, #183

To make SSL certification work, you need to set your windows environment variable, the file can be download here

CURL_CA_BUNDLE=C:\Ruby200\bin\ca-bundle.crt
SSL_CERT_FILE=C:\Ruby200\bin\cacert.pem

Finally, need copy all DLL and EXE file in C:\curl-7.40.0-devel-mingw32\bin to C:\Ruby200\bin.

Comments