I am having a problem using the 'Typhoeus Gem'. I have it installed properly (It shows up as installed when the command "gem list"). Below is the code I am running:
def test
response = Typhoeus.get("http://google.com")
puts response.code
end
puts test
Below is the error code I am getting when I try and run the code:
C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': 193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so (LoadError)
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/openssl.rb:17:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/net/https.rb:22:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/oauth-0.4.7/lib/oauth/consumer.rb:2:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/oauth-0.4.7/lib/oauth/client/helper.rb:2:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/oauth-0.4.7/lib/oauth.rb:10:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/etsy-0.3.0/lib/Etsy.rb:5:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from ./sandbox_GET.rb:10:in `<main>'
I have tried numerous solutions which I found on other websites but none of them seem to be working for me. I am running Windows 7 X64. I have read some where that there has been an issue with this problem on my OS config but I have failed to find any work around.
Any help would be greatly appreciated as I am completely lost to be honest. :)
Further Details
When I try "gem install openssl"
I get this error message
ERROR: Loading command: install (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
I am still a complete beginner and I could be making a very simple mistake but I am completely lost at the moment.
----------------------UPDATE-----------------------------------
After running "gem help commands" I get the error message
ERROR: Loading command: build (LoadError) 193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: cert (LoadError) 193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: check (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: generate_index (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: install (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: pristine (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: push (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: server (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/digest/md5.so
ERROR: Loading command: specification (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: unpack (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
ERROR: Loading command: update (LoadError)
193: %1 is not a valid Win32 application. - C:/Ruby21-x64/lib/ruby/2.1.0/x64-mingw32/openssl.so
GEM commands are:
build [No command found for build]
cert [No command found for cert]
check [No command found for check]
cleanup Clean up old versions of installed gems
contents Display the contents of the installed gems
dependency Show the dependencies of an installed gem
environment Display information about the RubyGems environment
fetch Download a gem and place it in the current directory
generate_index [No command found for generate_index]
help Provide help on the 'gem' command
install [No command found for install]
list Display local gems whose name starts with STRING
lock Generate a lockdown list of gems
mirror Mirror all gem files (requires rubygems-mirror)
outdated Display all gems that need updates
owner Manage gem owners of a gem on the push server
pristine [No command found for pristine]
push [No command found for push]
query Query gem information in local or remote repositories
rdoc Generates RDoc for pre-installed gems
search Display remote gems whose name contains STRING
server [No command found for server]
sources Manage the sources and cache file RubyGems uses to search
for gems
specification [No command found for specification]
stale List gems along with access times
uninstall Uninstall gems from the local repository
unpack [No command found for unpack]
update [No command found for update]
which Find the location of a library file you can require
yank Remove a pushed gem from the index
For help on a particular command, use 'gem help COMMAND'.
---------------------------UPDATE--------------------------------
I think I might have isolated the issue down to the devkit and the Curb gem
when I run "gem install curb" I get
ERROR: Error installing curb:
The 'curb' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
Going to have a look at the devkit and see if that is the problem. :)