Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I can't get Typhoeus gem to work on my Windows 7 machine.

Basically, it doesn't find "native.so" file in "C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/ext/typhoeus/". How do I fix this?

 C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/lib/typhoeus.rb:10:in
 `require': 126: The specified module
 could not be found.   -
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/ext/typhoeus/native.so
 (LoadError)    from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/typhoeus-0.2.4/lib/typhoeus.rb:10:in
 `<top (required)>'     from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in
 `require'  from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in
 `block (2 levels) in require'  from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in
 `each'     from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in
 `block in require'     from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in
 `each'     from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in
 `require'  from
 C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler.rb:120:in`require'
like image 790
krn Avatar asked Oct 11 '22 18:10

krn


1 Answers

What worked for me (Win7 x64) was to download the .dll from the link called Download libcurl.dll (all versions) only, found here: http://www.paehl.com/open_source/?CURL_7.35.0.

After extracting I took the .dll file from the NoSSL/SSL directory (either seems to work, I used SSL just to be sure). I copied the file into Ruby's /bin directory and Typhoeus worked.

Note: You can't use the x64 version of the .dll because Ruby is 32-bit. Typhoeus didn't react to the x64 file.

Hopefully this will help someone.

like image 60
Seralize Avatar answered Oct 17 '22 16:10

Seralize