2017-07-28 3 views
0

私は、次のエラーメッセージは(〜> 1.0)

C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/dependency.rb:308:in `to_specs': Could 
not find 'rubyzip' (~> 1.0) among 14 total gem(s) (Gem::MissingSpecError) 
Checked in 'GEM_PATH=C:/Users/me/.gem/ruby/2.4.0;C:/Ruby24- 
x64/lib/ruby/gems/2.4.0', execute `gem env` for more information 
     from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1442:in 
`block in activate_dependencies' 
     from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1431:in 
`each' 
    from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1431:in 
`activate_dependencies' 
    from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/specification.rb:1413:in 
`activate' 
    from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems.rb:220:in `rescue in 
try_activate' 
    from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems.rb:213:in `try_activate' 
    from C:/Ruby24- 
x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:126:in `rescue in 
require' 
    from C:/Ruby24- 
x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require' 
    from setupscript.rb:2:in `<main>' 

を受け取る私のRubyスクリプトを実行しようとすると、私は宝石のenvを実行すると、以下が

RubyGems Environment: 
    - RUBYGEMS VERSION: 2.6.11 
    - RUBY VERSION: 2.4.1 (2017-03-22 patchlevel 111) [x64-mingw32] 
    - INSTALLATION DIRECTORY: C:/Ruby24-x64/lib/ruby/gems/2.4.0 
    - USER INSTALLATION DIRECTORY: C:/Users/me/.gem/ruby/2.4.0 
    - RUBY EXECUTABLE: C:/Ruby24-x64/bin/ruby.exe 
    - EXECUTABLE DIRECTORY: C:/Ruby24-x64/bin 
    - SPEC CACHE DIRECTORY: C:/Users/me/.gem/specs 
    - SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData 
    - RUBYGEMS PLATFORMS: 
    - ruby 
    - x64-mingw32 
    - GEM PATHS: 
- C:/Ruby24-x64/lib/ruby/gems/2.4.0 
- C:/Users/me/.gem/ruby/2.4.0 
    - GEM CONFIGURATION: 
- :update_sources => true 
- :verbose => true 
- :backtrace => false 
- :bulk_threshold => 1000 
- :sources => [] 
    - REMOTE SOURCES: 
    - SHELL PATH: 
    - C:\Program Files\ConEmu\ConEmu\Scripts 
    - C:\Program Files\ConEmu 
    - C:\Program Files\ConEmu\ConEmu 
    - C:\ProgramData\Oracle\Java\javapath 
    - C:\Windows\system32 
     - C:\Windows 
- C:\Windows\System32\Wbem 
- C:\Windows\System32\WindowsPowerShell\v1.0\ 
- C:\Program Files (x86)\Oracle\instantclient_11_2 
- C:\Program Files (x86)\WebEx\Productivity Tools 
- C:\Program Files\nodejs\ 
- C:\Program Files (x86)\Silk\SilkTest 
- C:\Program Files (x86)\Silk\SilkTest\ng\gui 
- C:\Program Files\Microsoft SQL Server\130\Tools\Binn\ 
- C:\Program Files\dotnet\ 
- C:\Ruby24-x64\bin 

を返された 'rubyzip' が見つかりませんでした。 C:¥Users¥me¥AppData¥Local¥Microsoft¥WindowsApps、C:¥Users¥me¥Documents¥Automation¥SeleniumBrowserDrivers¥IEDriverServer_Win32_3.4.0¥ - C:¥Users¥me¥AppData¥Local¥Programs¥Fiddler - C:\ Users \ me \ AppData \ Roaming \ npm "

私のスクリプトは、seleniumhqページのサンプルRubyスクリプトです。

require 'rubygems' 
require 'selenium-webdriver' 

driver = Selenium::WebDriver.for :IE 
driver.get "http://google.com" 

element = driver.find_element :name => "q" 
element.send_keys "Cheese!" 
element.submit 

puts "Page title is #{driver.title}" 

wait = Selenium::WebDriver::Wait.new(:timeout => 10) 
wait.until { driver.title.downcase.start_with? "cheese!" } 

puts "Page title is #{driver.title}" 
driver.quit 

おかげで、私はrubyzipをインストールすることができませんでした何らかの理由で スコット

答えて

0

。私は

  • がインストール宝石を実行するフォルダに移動し、私のシステムの中に宝石をダウンロード

    • に必要な--force --local * .gemは、私は上記の手順でした

    とき宝石がインストールされました。

  • 関連する問題