(LoadError) 193: %1 не является допустимым приложением Win32. с Ruby на Windows 7 X64

У меня проблема с использованием "Typhoeus Gem". У меня он установлен правильно (он отображается как установленный при команде «список драгоценных камней»). Ниже приведен код, который я запускаю:

def test
   response = Typhoeus.get("http://google.com")
   puts response.code

end
   puts test

Ниже приведен код ошибки, который я получаю, когда пытаюсь запустить код:

 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>'

Я пробовал множество решений, которые я нашел на других сайтах, но ни одно из них, похоже, не работает для меня. Я использую Windows 7 X64. Я где-то читал, что в конфигурации моей ОС была проблема с этой проблемой, но мне не удалось найти обходной путь.

Любая помощь будет принята с благодарностью, так как я полностью потерян, если честно. :)

Более подробная информация

Когда я пытаюсь "установить драгоценный камень openssl"

Я получаю это сообщение об ошибке

  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

Я все еще полный новичок, и я мог бы сделать очень простую ошибку, но в данный момент я полностью потерян.

----------------------ОБНОВИТЬ--------------------------- --------

После запуска «команд помощи драгоценных камней» я получаю сообщение об ошибке

   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'.

---------------------------ОБНОВИТЬ---------------------- ----------

Я думаю, что мог бы изолировать проблему от devkit и драгоценного камня Curb.

когда я запускаю "gem install curb", я получаю

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'

Собираюсь взглянуть на devkit и посмотреть, не в этом ли проблема. :)


person Michael O Meara    schedule 16.08.2015    source источник
comment
@MarsAtomic Спасибо за ответ, да, я пытался выполнить шаги, описанные в этом ответе, но до сих пор безуспешно, похоже, проблема с драгоценным камнем openssl, поскольку я не могу установить драгоценный камень openssl   -  person Michael O Meara    schedule 17.08.2015
comment
Справедливо. Теперь ваш вопрос должен заключаться в том, почему я не могу установить openssl.   -  person MarsAtomic    schedule 17.08.2015
comment
Итак... у вас проблемы с gem openssl или у вас проблемы с подключением к RubyGems.org через открытый SSL? Кажется, я вообще не могу найти ссылку на какой-либо открытый драгоценный камень SSL - open SSL - это модуль для вашей установки Ruby.   -  person MarsAtomic    schedule 17.08.2015
comment
@MarsAtomic Спасибо за помощь. Да, я думаю, вы можете быть правы, это касается не только драгоценного камня openssl. Я попытался установить драгоценный камень rubygems-update-2.2.3.gem и получил похожее сообщение об ошибке. Я думаю, что на самом деле это может быть проблема с моими сертификатами ssl. Я пытался обновить сертификаты ssl, но не уверен, что делаю это правильно. Еще раз спасибо за интерес.   -  person Michael O Meara    schedule 17.08.2015
comment
Вы что-то меняли или пробовали что-то изменить при установке? Также не могли бы вы сказать мне, какой антивирус вы используете и что может повлиять на поведение LoadLibrary? (см. проблема RubyInstaller #102). Кроме того, Typhoeus — нетривиальная вещь для работы в Windows, но на самом деле это не связано с Typhoeus.   -  person Azolo    schedule 17.08.2015
comment
@Azolo Я думаю, вы можете быть правы ..... Я попытался запустить код ruby, который, как я точно знаю, должен работать, который не связан с Typhoeus, и он выдал то же сообщение об ошибке. Я думаю, что это может быть связано с некоторыми файлами сертификатов SSL, с которыми я, возможно, возился. Могу ли я переустановить свою установку Ruby и добавить openssl в качестве расширения? Спасибо еще раз   -  person Michael O Meara    schedule 17.08.2015
comment
@Azolo В данный момент я не использую антивирусы, что касается LoadLibary, мне ничего не известно.   -  person Michael O Meara    schedule 17.08.2015
comment
Мы отправляем скомпилированные OpenSSL двоичные файлы, необходимые для stdlib OpenSSL. Плюс нет openssl gem для установки из rubygems. Попробуйте запустить gem help commands и gem ins json и дайте мне знать, что произойдет. (Обновите свой вопрос)   -  person Azolo    schedule 17.08.2015
comment
Я обновил вопрос выше с результатами выполнения команд справки gem. Я получил похожие сообщения об ошибках при запуске gem ins json. Я думаю, было бы лучше, если бы я удалил ruby ​​​​и переустановил новую версию?   -  person Michael O Meara    schedule 17.08.2015
comment
Попытайся! Худшее, что может случиться, это не работает. Однако что-то мешает вашей загрузке OpenSSL.   -  person Azolo    schedule 17.08.2015
comment
Хорошо, я попробую, если я переустановлю ruby, это будет означать, что мне придется снова устанавливать все мои драгоценные камни?   -  person Michael O Meara    schedule 17.08.2015
comment
Да, вам придется переустановить все ваши драгоценные камни   -  person Azolo    schedule 17.08.2015
comment
@Azolo Я думаю, что моя проблема может быть связана с этим github.com/oneclick/rubyinstaller/issues/276 Думаю, вы тоже внесли свой вклад в решение этой проблемы. Как создать гуардфайл? Спасибо   -  person Michael O Meara    schedule 18.08.2015
comment
Я на самом деле уверен, что это не связано. Но я думаю, что этой проблемы достаточно, и вы должны открыть тикет в проекте RubyInstaller, чтобы мы могли устранить ее там. Это довольно сбивает с толку.   -  person Azolo    schedule 18.08.2015
comment
Хорошо. Есть ли какой-нибудь обходной путь, который я мог бы использовать, поскольку сейчас я действительно застрял в своем проекте, поскольку Ruby кажется, что нужная мне функция не работает в моей конфигурации?   -  person Michael O Meara    schedule 29.08.2015