Windows 8.1上的Pry-doc安装

时间:2015-12-26 09:35:27

标签: ruby-on-rails ruby pry

我已经在Windows 8.1桌面上安装了pry。但要访问Ruby Core文档和要使用pry的所有功能,我正在尝试安装pry-doc,我收到以下错误:

gem install pry-doc
  

错误:安装pry-doc时出错:无效的gem:包已损坏,   验证时出现异常:未定义的方法' size'为零:NilClass   (NoMethodError)中   H:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/cache/pry-doc-0.8.0.gem

我安装了以下宝石:

`gem list`

*** LOCAL GEMS ***

`abstract (1.0.0)
actionmailer (4.1.8, 4.0.0.rc2, 3.0.9)
actionpack (4.1.8, 4.0.0.rc2, 3.0.9)
actionview (4.1.8)
activemodel (4.1.8, 4.0.0.rc2, 3.0.9)
activerecord (4.1.8, 4.0.0.rc2, 3.0.9)
activerecord-deprecated_finders (1.0.4, 1.0.3)
activerecord-sqlserver-adapter (4.1.0)
activeresource (3.0.9)
activesupport (4.1.8, 4.0.0.rc2, 3.0.9)
arel (5.0.1.20140414130214, 4.0.2, 4.0.0, 2.0.10)
atk (3.0.7 x86-mingw32)
atomic (1.1.9)
bcrypt (3.1.10 x86-mingw32)
bcrypt-ruby (3.1.5 x86-mingw32, 3.0.1 x86-mingw32)
bigdecimal (1.2.4)
builder (3.2.2, 3.1.4, 2.1.2)
bundler (1.7.7)
cairo (1.14.3 x86-mingw32)
coderay (1.1.0)
coffee-rails (4.1.0, 4.0.1, 4.0.0)
coffee-script (2.4.1, 2.3.0, 2.2.0)
coffee-script-source (1.10.0, 1.9.1.1, 1.8.0, 1.6.2)
devise (3.0.4, 3.0.0.rc)
domain_name (0.5.25)
erubis (2.7.0, 2.6.6)
execjs (2.6.0, 2.2.2, 1.4.0)
gdk_pixbuf2 (3.0.7 x86-mingw32)
glib2 (3.0.7 x86-mingw32)
green_shoes (1.1.374)
gtk2 (3.0.7 x86-mingw32)
hike (1.2.3)
http-cookie (1.0.2)
i18n (0.7.0, 0.7.0.beta1, 0.6.4, 0.5.0)
io-console (0.4.2)
jbuilder (2.3.2)
jquery-rails (3.1.4, 3.1.2, 3.0.1)
json (1.8.3, 1.8.1, 1.8.0, 1.6.1)
kaminari (0.16.3, 0.14.1)
mail (2.6.3, 2.5.4, 2.2.19)
mechanize (2.7.3)
method_source (0.8.2)
mime-types (2.99, 2.6.2, 2.4.3, 1.25.1, 1.23, 1.17.1)
mini_portile2 (2.0.0)
minitest (5.8.3, 5.8.2, 5.4.3, 4.7.5, 4.7.4)
multi_json (1.11.2, 1.10.1, 1.7.6)
net-http-digest_auth (1.4)
net-http-persistent (2.9.4)
nokogiri (1.6.8.rc1 x86-mingw32)
ntlm-http (0.1.1)
orm_adapter (0.5.0, 0.4.0)
pango (3.0.7 x86-mingw32)
pg (0.17.1 x86-mingw32)
pkg-config (1.1.6)
polyglot (0.3.5, 0.3.3, 0.3.2)
pry (0.10.3)
psych (2.0.5)
rack (1.5.5, 1.5.2, 1.2.4)
rack-mount (0.6.14)
rack-test (0.6.3, 0.6.2, 0.5.7)
rails (4.1.8, 4.0.0.rc2, 3.0.9)
railties (4.1.8, 4.0.0.rc2, 3.0.9)
rake (10.4.2, 10.1.0, 10.0.4, 0.9.2.2)
rb-readline (0.5.1)
rdoc (4.2.0, 4.1.0, 3.12.2, 3.11)
RedCloth (4.2.9 x86-mingw32)
rubygems-update (2.2.3)
rubyzip (1.1.6)
sass (3.4.19, 3.2.19, 3.2.9)
sass-rails (4.0.5, 4.0.0, 4.0.0.rc2)
sdoc (0.4.1, 0.3.20)
simple_form (3.0.0.rc)
slop (3.6.0)
sprockets (3.0.0.beta.4, 2.12.4, 2.12.3, 2.10.0)
sprockets-rails (2.3.3, 2.2.1, 2.0.1, 2.0.0)
sqlite3 (1.3.11 x86-mingw32, 1.3.10 x86-mingw32, 1.3.7 x86-mingw32, 1.3.4 x86-mingw32)
sqlite3-ruby (1.3.3)
test-unit (2.1.5.0)
thor (0.19.1, 0.18.1, 0.14.6)
thread_safe (0.3.5, 0.3.4, 0.1.0)
tilt (1.4.1)
treetop (1.4.15, 1.4.14, 1.4.10)
turbolinks (2.5.3, 1.2.0)
tzinfo (1.2.2, 0.3.46, 0.3.37, 0.3.30)
tzinfo-data (1.2015.7)
uglifier (2.7.2, 2.1.1)
unf (0.2.0.beta2)
warden (1.2.3, 1.2.1)
webrobots (0.1.1)
yard (0.8.7.6)
zurb-foundation (4.2.3, 4.2.2)`

1 个答案:

答案 0 :(得分:0)

当宝石的下载由于未知原因而失败时,有时会发生这种情况。因此,gem的缓存版本已损坏。

只需删除

中的缓存版本即可
h:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/cache/pry-doc-0.8.0.gem

再次运行bundle install