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:
- Download cURL from the following URL: https://curl.haxx.se/windows/ (I chose 64bit because that's the system I'm using)
- Go into the archive and browse to
/bin
- Locate
libcurl_x64.dll
(it may be justlibcurl.dll
) - Extract to your local drive
- Rename it to
libcurl.dll
if it has the_x64
suffix - 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
Rails 5 Db Migration: How to Fix Activerecord::Concurrentmigrationerror
How to Give a Sub-Module the Same Name as a Top-Level Class
Command for Displaying a Gem's Dependencies
Scaffolding Activerecord: Two Columns of the Same Data Type
Ruby on Rails 4 - Simple_Form Multiple Select Input
Rmagick - How to Find Out the Pixel Dimension of an Image
Installing Ruby-2.1.2: Cannot Load Such File -- Openssl (Loaderror)
Ruby: Array Contained in Array, Any Order
How to Correctly Install Rvm in Docker
Problem Using Openstruct with Erb
How to Specify the Location of the Chromedriver Binary
How to Set a Hook to Run Code at the End of a Ruby Class Definition
Possible to Use Stylesheet.Css.Erb in Rails
How to Decode Q-Encoded Strings in Ruby
Converting a Unique Seed String into a Random, Yet Deterministic, Float Value in Ruby
Install Nokogiri 1.6.1 Under Ruby 2.0.0P353 (Rvm Based Installation) Fails (Osx Mavericks)