1

几年前,我一直在 Windows 上使用 Netbeans,甚至在它成为 Apache Netbeans 之前。我仍然很乐意在 Apache Netbeans IDE 11.0 中使用Ruby2.4 + MSYS2和 Ruby 插件(Netbeans 8.2 插件门户可以在 Netbeans 11.0 IDE 中顺利使用),它可以帮助我在安装了 Fast Debugger 的情况下很好地调试 Ruby 代码(ruby-debug-ide gem) . 但是,由于一些限制,我必须迁移到 Ruby2.6.3。因此,我将我在 Ruby 2.4 中看到的所有 gem 都安装到了 Ruby 2.6 环境中,并期望它能够工作。

工具 >> Ruby 平台 >>(选择平台)Ruby 2.4.1-p111 >> Gem Manager >>(完美显示所有已安装)Ruby Gems

相似地

工具 >> Ruby 平台 >> (选择平台)Ruby 2.6.3-p62 >> Gem Manager >> Gems Fetching failed

选择 Ruby 2.6.3 平台

宝石获取失败消息

在查看 Rubygems 的 Netbeans wiki 页面上的一些旧文档后,我发现Ruby Gems Fetching Failed它说,NetBeans 只是在后台使用gem工具。如果 gems 获取失败,请务必从命令行检查它是否有效,特别是以下命令:

宝石列表 --local --details

gem list --remote --details (我没有任何远程 gem,所以这个没有结果)

PS C:\Tools> gem list --local --details

*** LOCAL GEMS ***

activemodel (6.0.0, 3.2.22.5)
    Author: David Heinemeier Hansson
    Homepage: https://rubyonrails.org
    License: MIT
    Installed at (6.0.0): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (3.2.22.5): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A toolkit for building modeling frameworks (part of Rails).

activeresource (3.2.22.5)
    Author: David Heinemeier Hansson
    Homepage: http://www.rubyonrails.org
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    REST modeling framework (part of Rails).

activesupport (6.0.0, 3.2.22.5)
    Author: David Heinemeier Hansson
    Homepage: https://rubyonrails.org
    License: MIT
    Installed at (6.0.0): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (3.2.22.5): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A toolkit of support libraries and Ruby core extensions extracted
    from the Rails framework.

archive-tar-minitar (0.6.1)
    Author: Austin Ziegler
    Homepage: https://github.com/halostatue/minitar/
    Licenses: Ruby, BSD-2-Clause
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    'archive-tar-minitar' has been deprecated; just install 'minitar'.

bigdecimal (1.4.1)
    Authors: Kenta Murata, Zachary Scott, Shigeo Kobayashi
    Homepage: https://github.com/ruby/bigdecimal
    License: ruby
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Arbitrary-precision decimal floating-point number library.

binding_of_caller (0.7.2)
    Author: John Mair (banisterfiend)
    Homepage: http://github.com/banister/binding_of_caller
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Retrieve the binding of a method's caller. Can also retrieve
    bindings even further up the stack.

builder (3.0.4)
    Author: Jim Weirich
    Homepage: http://onestepback.org
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Builders for MarkUp.

bundler (1.17.2)
    Authors: André Arko, Samuel Giddins, Colby Swandale, Hiroshi
    Shibata, David Rodríguez, Grey Baker, Stephanie Morillo, Chris
    Morris, James Wen, Tim Moore, André Medeiros, Jessica Lynn Suttles,
    Terence Lee, Carl Lerche, Yehuda Katz
    Homepage: http://bundler.io
    License: MIT
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    The best way to manage your application's dependencies

byebug (9.0.6)
    Authors: David Rodriguez, Kent Sibilev, Mark Moseley
    Homepage: http://github.com/deivid-rodriguez/byebug
    License: BSD-2-Clause
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Ruby 2.0 fast debugger - base + CLI

cmath (1.0.0)
    Author: Tadayoshi Funaba
    Homepage: https://github.com/ruby/cmath
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides Trigonometric and Transcendental functions for complex
    numbers

coderay (1.1.1)
    Author: Kornelius Kalnbach
    Homepage: http://coderay.rubychan.de
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Fast syntax highlighting for selected languages.

concurrent-ruby (1.1.5)
    Authors: Jerry D'Antonio, Petr Chalupa, The Ruby Concurrency Team
    Homepage: http://www.concurrent-ruby.com
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Modern concurrency tools for Ruby. Inspired by Erlang, Clojure,
    Scala, Haskell, F#, C#, Java, and classic concurrency patterns.

csv (3.0.9)
    Authors: James Edward Gray II, Kouhei Sutou
    Homepage: https://github.com/ruby/csv
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    CSV Reading and Writing

date (2.0.0)
    Author: Tadayoshi Funaba
    Homepage: https://github.com/ruby/date
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A subclass of Object includes Comparable module for handling dates.

dbm (1.0.0)
    Author: Yukihiro Matsumoto
    Homepage: https://github.com/ruby/dbm
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides a wrapper for the UNIX-style Database Manager Library

debase (0.2.4, 0.2.2)
    Author: Dennis Ushakov
    Homepage: https://github.com/denofevil/debase
    License: MIT
    Installed at (0.2.4): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (0.2.2): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    debase is a fast implementation of the standard Ruby debugger
    debug.rb for Ruby 2.0

debase-ruby_core_source (0.10.5, 0.9.9)
    Authors: Mark Moseley, Gabriel Horner, JetBrains RubyMine Team
    Homepage: http://github.com/os97673/debase-ruby_core_source
    License: MIT
    Installed at (0.10.5): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (0.9.9): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provide Ruby core source files

debug_inspector (0.0.3)
    Author: John Mair (banisterfiend)
    Homepage: https://github.com/banister/debug_inspector
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A Ruby wrapper for the MRI 2.0 debug_inspector API

did_you_mean (1.3.0)
    Author: Yuki Nishijima
    Homepage: https://github.com/yuki24/did_you_mean
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    "Did you mean?" experience in Ruby

e2mmap (0.1.0)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/e2mmap
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Module for defining custom exceptions with specific messages.

etc (1.0.1)
    Author: Yukihiro Matsumoto
    Homepage: https://github.com/ruby/etc
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides access to information typically stored in UNIX /etc
    directory.

fcntl (1.0.0)
    Author: Yukihiro Matsumoto
    Homepage: https://github.com/ruby/fcntl
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Loads constants defined in the OS fcntl.h C header file

ffi (1.11.1)
    Platform: x64-mingw32
    Author: Wayne Meissner
    Homepage: http://wiki.github.com/ffi/ffi
    License: BSD-3-Clause
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Ruby FFI

fiddle (1.0.0)
    Authors: Aaron Patterson, SHIBATA Hiroshi
    Homepage: https://github.com/ruby/fiddle
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A libffi wrapper for Ruby.

fileutils (1.1.0)
    Author: Minero Aoki
    Homepage: https://github.com/ruby/fileutils
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Several file utility methods for copying, moving, removing, etc.

forwardable (1.2.0)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/forwardable
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides delegation of specified methods to a designated object.

gdbm (2.0.0)
    Author: Yukihiro Matsumoto
    Homepage: https://github.com/ruby/gdbm
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Ruby extension for GNU dbm.

hashie (3.5.6)
    Authors: Michael Bleigh, Jerry Cheung
    Homepage: https://github.com/intridea/hashie
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Your friendly neighborhood hash library.

i18n (1.6.0, 0.9.5)
    Authors: Sven Fuchs, Joshua Harvey, Matt Aimonetti, Stephan Soller,
    Saimon Moore, Ryan Bigg
    Homepage: http://github.com/ruby-i18n/i18n
    License: MIT
    Installed at (1.6.0): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (0.9.5): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    New wave Internationalization support for Ruby

image_size (1.1.5)
    Authors: Keisuke Minami, Ivan Kuchin
    Homepage: http://github.com/toy/image_size
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Measure image size using pure Ruby

io-console (0.4.7)
    Author: Nobu Nakada
    Homepage: https://github.com/ruby/io-console
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Console interface

ipaddr (1.2.2)
    Authors: Akinori MUSHA, Hajimu UMEMOTO
    Homepage: https://github.com/ruby/ipaddr
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A class to manipulate an IP address in ruby

irb (1.0.0)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/irb
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Interactive Ruby command-line tool for REPL (Read Eval Print Loop).

json (2.1.0)
    Author: Florian Frank
    Homepage: http://flori.github.com/json
    License: Ruby
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    JSON Implementation for Ruby

levenshtein (0.2.2)
    Author: Erik Veenstra
    Homepage: http://www.erikveen.dds.nl/levenshtein/index.html
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Calculates the Levenshtein distance between two byte strings.

linecache2 (1.4.0)
    Author: R. Bernstein
    Homepage: http://github.com/rocky/rb-linecache2
    License: GPL2
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Module to read and cache Ruby program files and file information

logger (1.3.0)
    Author: SHIBATA Hiroshi
    Homepage: https://github.com/ruby/logger
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides a simple logging utility for outputting messages.

lru_redux (1.1.0)
    Authors: Sam Saffron, Kaijah Hougham
    Homepage: https://github.com/SamSaffron/lru_redux
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    An efficient implementation of an lru cache

matrix (0.1.0)
    Author: Marc-Andre Lafortune
    Homepage: https://github.com/ruby/matrix
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    An implementation of Matrix and Vector classes.

method_source (0.8.2)
    Author: John Mair (banisterfiend)
    Homepage: http://banisterfiend.wordpress.com
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    retrieve the sourcecode for a method

mini_portile2 (2.4.0)
    Authors: Luis Lavena, Mike Dalessio, Lars Kanis
    Homepage: http://github.com/flavorjones/mini_portile
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Simplistic port-like solution for developers

minitar (0.6.1)
    Author: Austin Ziegler
    Homepage: https://github.com/halostatue/minitar/
    Licenses: Ruby, BSD-2-Clause
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    The minitar library is a pure-Ruby library that provides the ability
    to deal with POSIX tar(1) archive files

minitar-cli (0.6.1)
    Author: Austin Ziegler
    Homepage: https://github.com/halostatue/minitar-cli/
    Licenses: Ruby, BSD-2-Clause
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    <tt>minitar-cli</tt> is a pure-Ruby command-line tool that uses
    {minitar}[https://github.com/halostatue/minitar] to provide a
    command-line tool, +minitar+, for working with POSIX tar(1) archive
    files

minitest (5.11.3)
    Author: Ryan Davis
    Homepage: https://github.com/seattlerb/minitest
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    minitest provides a complete suite of testing facilities supporting
    TDD, BDD, mocking, and benchmarking

multi_json (1.13.1)
    Authors: Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober, Pavel
    Pravosud
    Homepage: http://github.com/intridea/multi_json
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A common interface to multiple JSON libraries.

mutex_m (0.1.0)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/mutex_m
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Mixin to extend objects to be handled like a Mutex.

net-telnet (0.2.0)
    Author: SHIBATA Hiroshi
    Homepage: https://github.com/ruby/net-telnet
    License: ruby
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides telnet client functionality.

nokogiri (1.10.3)
    Platform: x64-mingw32
    Authors: Aaron Patterson, Mike Dalessio, Yoko Harada, Tim Elliott,
    Akinori MUSHA, John Shahid, Lars Kanis
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser

openssl (2.1.2)
    Authors: Martin Bosslet, SHIBATA Hiroshi, Zachary Scott, Kazuki
    Yamaguchi
    Homepage: https://github.com/ruby/openssl
    License: Ruby
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    OpenSSL provides SSL, TLS and general purpose cryptography.

ostruct (0.1.0)
    Author: Marc-Andre Lafortune
    Homepage: https://github.com/ruby/ostruct
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Class to build custom data structures, similar to a Hash.

power_assert (1.1.3)
    Author: Kazuki Tsujimoto
    Homepage: https://github.com/k-tsj/power_assert
    Licenses: 2-clause BSDL, Ruby's
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Power Assert for Ruby

powerbar (1.0.18)
    Author: Moe
    Homepage: https://github.com/busyloop/powerbar
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    The last progressbar-library you'll ever need

prime (0.1.0)
    Author: Yuki Sonoda
    Homepage: https://github.com/ruby/prime
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Prime numbers and factorization library.

pry (0.10.4)
    Authors: John Mair (banisterfiend), Conrad Irwin, Ryan Fitzgerald
    Homepage: http://pryrepl.org
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    An IRB alternative and runtime developer console

pry-byebug (3.4.2)
    Authors: David Rodríguez, Gopal Patel
    Homepage: https://github.com/deivid-rodriguez/pry-byebug
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Fast debugging with Pry.

pry-stack_explorer (0.4.9.2)
    Author: John Mair (banisterfiend)
    Homepage: https://github.com/pry/pry-stack_explorer
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Walk the stack in a Pry session

psych (3.1.0)
    Authors: Aaron Patterson, SHIBATA Hiroshi, Charles Oliver Nutter
    Homepage: https://github.com/ruby/psych
    License: MIT
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Psych is a YAML parser and emitter

rake (12.3.3, 12.3.2)
    Authors: Hiroshi SHIBATA, Eric Hodel, Jim Weirich
    Homepage: https://github.com/ruby/rake
    License: MIT
    Installed at (12.3.3): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (12.3.2): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Rake is a Make-like program implemented in Ruby

rdoc (6.1.0)
    Authors: Eric Hodel, Dave Thomas, Phil Hagelberg, Tony Strauss,
    Zachary Scott, Hiroshi SHIBATA, ITOYANAGI Sakura
    Homepage: https://ruby.github.io/rdoc
    License: Ruby
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    RDoc produces HTML and command-line documentation for Ruby projects

rexml (3.1.9)
    Author: Kouhei Sutou
    Homepage: https://github.com/ruby/rexml
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    An XML toolkit for Ruby

rss (0.2.7)
    Author: Kouhei Sutou
    Homepage: https://github.com/ruby/rss
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Family of libraries that support various formats of XML "feeds".

ruby-dbus (0.10.0)
    Author: Ruby DBus Team
    Homepage: https://trac.luon.net/ruby-dbus
    License: LGPL v2.1
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Ruby module for interaction with D-Bus

ruby-debug-ide (0.4.22)
    Author: Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains
    RubyMine Team
    Homepage: https://github.com/ruby-debug/ruby-debug-ide
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    IDE interface for ruby-debug.

ruby-prof (0.16.2)
    Author: Shugo Maeda, Charlie Savage, Roger Pack, Stefan Kaes
    Homepage: https://github.com/ruby-prof/ruby-prof
    License: BSD-2-Clause
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Fast Ruby profiler

ruby_core_source (0.1.5)
    Author: Mark Moseley
    Homepage: http://github.com/mark-moseley/ruby_core_source
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Retrieve Ruby core source files

rubygems-update (3.0.3)
    Authors: Jim Weirich, Chad Fowler, Eric Hodel, Luis Lavena, Aaron
    Patterson, Samuel Giddins, André Arko, Evan Phoenix, Hiroshi SHIBATA
    Homepage: https://rubygems.org
    Licenses: Ruby, MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    RubyGems is a package management framework for Ruby.

scanf (1.0.0)
    Author: David Alan Black
    Homepage: https://github.com/ruby/scanf
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    scanf is an implementation of the C function scanf(3).

sdbm (1.0.0)
    Author: Yukihiro Matsumoto
    Homepage: https://github.com/ruby/sdbm
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides a simple file-based key-value store with String keys and
    values.

shell (0.7)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/shell
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    An idiomatic Ruby interface for common UNIX shell commands.

slop (3.6.0)
    Author: Lee Jarvis
    Homepage: http://github.com/leejarvis/slop
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Simple Lightweight Option Parsing

stringio (0.0.2)
    Author: Nobu Nakada
    Homepage: https://github.com/ruby/stringio
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Pseudo IO on String

strscan (1.0.0)
    Author: Minero Aoki
    Homepage: https://github.com/ruby/strscan
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Provides lexical scanning operations on a String.

sync (0.5.0)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/sync
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A module that provides a two-phase lock with a counter.

test-unit (3.3.3, 3.2.9)
    Authors: Kouhei Sutou, Haruka Yoshihara
    Homepage: http://test-unit.github.io/
    Licenses: Ruby, PSFL
    Installed at (3.3.3): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (3.2.9): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    An xUnit family unit testing framework for Ruby.

thread_safe (0.3.6)
    Authors: Charles Oliver Nutter, thedarkone
    Homepage: https://github.com/ruby-concurrency/thread_safe
    License: Apache-2.0
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Thread-safe collections and utilities for Ruby

thwait (0.1.0)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/thwait
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Watches for termination of multiple threads.

tracer (0.1.0)
    Author: Keiju ISHITSUKA
    Homepage: https://github.com/ruby/tracer
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Outputs a source level execution trace of a Ruby program.

tzinfo (1.2.5)
    Author: Philip Ross
    Homepage: http://tzinfo.github.io
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Daylight savings aware timezone library

webrick (1.4.2)
    Authors: TAKAHASHI Masayoshi, GOTOU YUUZOU, Eric Wong
    Homepage: https://www.ruby-lang.org
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    HTTP server toolkit

xml-simple (1.1.5)
    Author: Maik Schmidt
    Homepage: https://github.com/maik/xml-simple
    License: Ruby
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    A simple API for XML processing.

xmlrpc (0.3.0, 0.2.1)
    Author: SHIBATA Hiroshi
    Homepage: https://github.com/ruby/xmlrpc
    License: Ruby
    Installed at (0.3.0): C:/Ruby26-x64/lib/ruby/gems/2.6.0
                 (0.2.1): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    XMLRPC is a lightweight protocol that enables remote procedure calls
    over HTTP.

zeitwerk (2.1.9)
    Author: Xavier Noria
    Homepage: https://github.com/fxn/zeitwerk
    License: MIT
    Installed at: C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Efficient and thread-safe constant autoloader

zlib (1.0.0)
    Authors: Yukihiro Matsumoto, UENO Katsuhiro
    Homepage: https://github.com/ruby/zlib
    License: BSD-2-Clause
    Installed at (default): C:/Ruby26-x64/lib/ruby/gems/2.6.0

    Ruby interface for the zlib compression/decompression library

我想知道为什么它可以与 Ruby 2.4 包一起使用并且无法为 Ruby 2.6.3 包获取 gem。Netbeans Ruby 论坛和邮件列表似乎已经退出历史,#netbeans IRC 似乎闲置,没有人回应。我提前感谢您提出的任何建议。

PS 除非 Gem Manager 正常工作,否则我无法调试任何程序 - 因为调试器不起作用。

4

1 回答 1

0

问题

失败发生在Gem::Util.glob_files_in_dirRubyGems 3 中定义为:

def self.glob_files_in_dir(glob, base_path)
  if RUBY_VERSION >= "2.5"
    Dir.glob(glob, base: base_path).map! {|f| File.expand_path(f, base_path) }
  else
    Dir.glob(File.expand_path(glob, base_path))
  end
end

传递给该方法的参数是:

glob = "did_you_mean-*.gemspec"
base_path = "C:/Users/myuser/.gem/ruby/2.6.0:C:/Ruby26/lib/ruby/gems/2.6.0/specifications"

在较旧的 Ruby 版本中,此 base_path 参数将导致glob_files_in_dir返回[]. 较新的版本会引发参数错误。

解决方案

您可以通过手动设置 NetBean 的 gem 路径来解决此问题:

  1. 从菜单中,选择工具 > Ruby 平台
  2. 选择您的 Ruby 2.6 平台
  3. 在 Gem Path 列表中,选择现有值 - 例如“C:\Users\myuser.gem\ruby\2.6.0:C:\Ruby26\lib\ruby\gems\2.6.0”
  4. 单击删除
  5. 单击添加...
  6. 输入文件名“C:\Ruby26\lib\ruby\gems\2.6.0”
  7. 单击打开以选择文件夹
  8. 单击关闭关闭对话框

最后,平台应如下所示:

Ruby 平台管理器

于 2019-10-15T20:32:07.317 回答