Typhoeus Windows Installation

Typhoeus Windows installation

Seem to have figured it out. If anyone is having the same issue, make sure to download the following package from curl.haxx.se/download.html

Win32 2000/XP zip 7.34.0 libcurl SSL Günter Knauf 3.34 MB

Extract the bin directory to wherever and make sure to add it to your PATH. I also added .DLL to PATHEXT reset comp and it worked.

Ruby on Rails: running Typhoeus on Windows 7 (64 bit)

The problem seems that typhoeus requires curl as development library to successfully compile it's native.so extension.

First you need to install RubyInstaller DevKit from downloads page.
Second you will need to get curl and development headers and libraries for MinGW, which you can find instructions on our mailing list:

http://groups.google.com/group/rubyinstaller/browse_thread/thread/c8a4bdb6663cbf7c

To the record, that same post mentions how unsuccessfully was the user attempt to get the gem to work on Windows and he ended switching to curb.

PS: while others might say that *.so is UNIX/POSIX convention for shared objects, is the extension Ruby decided to use for Windows C-Extensions, like Python uses *.pyd for their extensions.

Rails Typhoeus Curl Trouble

Is libcurl properly installed? Typhoeus has no native extensions but it requires libcurl dynamic library (.so) since it works with the FFI library:

# from lib/typhoeus/curl.rb
ffi_lib 'libcurl'

I would say that the development files (headers) are not needed so sudo apt-get install libcurl3 should do the trick (otherwise install the devel version w/ SSL support via sudo apt-get install libcurl4-openssl-dev).

gem install typhoeus - failed to build gem extension

Not sure, but it seems that your system is not quite as the gem source expects.

Since its using curl and from this old problem, I would guess that your curl needs updating.

Is it the system installed curl, or are you using macports - perhaps its worth doing an update...

Alternatively can you try the install on a recent *nix system - that might work and so confirm its an environment issue.

From the github page, there are some notes on how to use it with an old curl...

Good luck, Chris

Is HTTP/2 supported in Typhoeus

Yes, it's supported, according to https://github.com/typhoeus/typhoeus/issues/628#issuecomment-496976697 you can create an HTTP2 request with:

response = Typhoeus.get("https://nghttp2.org", http_version: :httpv2_0, verbose: true)

and you can check the HTTP version with:
response.http_version
=> "2"

Remember that Typhoeus use libcurl and it has support for HTTP/2, but the underlying cUrl version needs to have support compiled in, so you use an old version, your results may vary.

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

Typhoeus ssl_connect_error

After some sometime I reached into https://imlc.me/dh-key-too-small where it gives directions on how to lower one's own security level.

But it also tell you that you can add the --cipher 'DEFAULT:!DH into curl command line

Now, to get that flag working in Typhoeus, you have to send an option to Ethon about it. In Ethon Options the ssl_cipher_list is a valid option.

So now you can just add ssl_cipher_list into your Request options like so

request = Typhoeus::Request.new(url,
method: method,
body: body,
headers: headers,
params: params,
ssl_cipher_list: 'DEFAULT:!DH')


Related Topics



Leave a reply



Submit