RVM 工作,安装了 Ruby 个 gems,但无法通过 require 访问

RVM works, Ruby gems installed, but not accessible with require

这是我的问题:

➜  ~ rvm current
ruby-2.2.1
➜  ~ rvm list

rvm rubies

   ruby-2.0.0-p643 [ x86_64 ]
   ruby-2.1.1 [ x86_64 ]
=* ruby-2.2.1 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

➜  ~ ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
➜  ~ gem list

*** LOCAL GEMS ***

bigdecimal (1.2.6)
bundler (1.10.6)
coderay (1.1.0)
domain_name (0.5.24)
http-cookie (1.0.2)
io-console (0.4.3)
json (1.8.1)
method_source (0.8.2)
mime-types (2.6.1)
netrc (0.10.3)
plaid-ruby (0.1.2)
plist (3.1.0)
pry (0.10.1)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
rest-client (1.8.0)
slop (3.6.0)
unf (0.1.4)
unf_ext (0.0.7.1)
➜  ~ irb
irb(main):001:0> require 'plaid-ruby'
LoadError: cannot load such file -- plaid-ruby
    from /Users/richardburton/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/richardburton/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from (irb):1
    from /Users/richardburton/.rvm/rubies/ruby-2.2.1/bin/irb:11:in `<main>'
irb(main):002:0>

您需要要求 plaid,而不是 plaid-ruby。您需要的文件不一定与 gem 同名,但通常情况下是这样。

其实来自Rubygems page for plaid-ruby and the Github page it links to it looks like it is an old version of the Plaid client, and you should be using the plaid gem.