Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails &引用;(LoadError)193:%1不是有效的Win32应用程序;使用Windows 7 X64上的Ruby_Ruby On Rails_Ruby_Openssl_Typhoeus - Fatal编程技术网

Ruby on rails &引用;(LoadError)193:%1不是有效的Win32应用程序;使用Windows 7 X64上的Ruby

Ruby on rails &引用;(LoadError)193:%1不是有效的Win32应用程序;使用Windows 7 X64上的Ruby,ruby-on-rails,ruby,openssl,typhoeus,Ruby On Rails,Ruby,Openssl,Typhoeus,我在使用“台风宝石”时遇到问题。我已经正确安装了它(当命令“gem list”时,它显示为已安装)。下面是我正在运行的代码: 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:

我在使用“台风宝石”时遇到问题。我已经正确安装了它(当命令“gem list”时,它显示为已安装)。下面是我正在运行的代码:

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>'
我仍然是一个完全的初学者,我可能会犯一个非常简单的错误,但我现在完全迷失了方向

----------------------更新-----------------------------------

运行“gem help commands”后,我得到错误消息

  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和路边宝石

当我运行“gem安装路缘”时,我得到


我们将查看devkit,看看这是否是问题所在。:)

@MarsAtomic的可能重复感谢您的回复是的,我已经尝试按照该回答中的步骤进行操作,但仍然没有成功似乎是openssl gem的问题,因为我无法公平地安装“gem openssl”。现在你的问题是“为什么我不能安装openssl”。所以。。。您是说您在使用“gem openssl”时遇到问题,还是在通过开放SSL连接到RubyGems.org时遇到问题?我似乎根本找不到任何OpenSSL gem的参考——OpenSSL是Ruby安装的一个模块。@MarsAtomic感谢您的帮助。是的,我想你可能是对的,不仅仅是openssl gem,我尝试了“gem install rubygems-update-2.2.3.gem”,我收到了类似的错误消息。我想这实际上可能是我的ssl证书有问题。我尝试更新ssl证书,但不确定是否正确。再次感谢您的关注。
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'