【发布时间】:2014-04-09 01:12:06
【问题描述】:
前言:我在 Windows 8 机器上,运行 Ruby 2.0.0。
我最近为 Ruby 安装了 gamebox gem。在安装其所有依赖项的过程中,由于rdoc 中的一些 ASCII/Unicode 问题,一些文件(其中的文件 $RUBYHOME/lib/ruby/gems/2.0.0/gems/gosu-0.7.50-x86-mingw32/lib/gosu.for_1_9.so)没有正确构建,因此被“跳过”。一开始我并没有太注意它,但是当我尝试运行gamebox test_game 来设置一个新的gamebox 游戏时,它向我吐出了以下消息:
C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:in `require': 126: The specified module could not be found. - C:/Ruby200/lib/ruby/gems/2.0.0/gems/gosu-0.7.50-x86-mingw32/lib/gosu.for_1_9.so (LoadError)
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:118:in `rescue in require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:124:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/gosu-0.7.50-x86-mingw32/lib/gosu.rb:11:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:in `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:114:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/gamebox-0.5.0/lib/gamebox.rb:5:in `<top (required)>'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:66:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/gamebox-0.5.0/bin/gamebox:4:in `<top (required)>'
from C:/Ruby200/bin/gamebox:23:in `load'
from C:/Ruby200/bin/gamebox:23:in `<main>'
重要的一点是The specified module could not be found. - C:/Ruby200/lib/ruby/gems/2.0.0/gems/gosu-0.7.50-x86-mingw32/lib/gosu.for_1_9.so
然后我回过头来意识到整个 Unicode 的事情,将 rdoc 更新为按照 this guy 的最新版本,然后运行 gem uninstall gosu,然后运行 gem install gosu。一切似乎都构建得很好,我看到所需的文件 .../gosu.for_1_9.so 就在它需要的位置。
但是,关于无法找到 gosu.for_1_9.so!
我已经能够准确地找到两个其他人遇到此问题的 Google 搜索结果。在一种情况下,问题是次要的,因为这家伙正在破解他的gosu 安装。另一方面,解决方案是“Ruby 2 不好,你应该使用 Ruby 1.9”,这真的不是我的首选。
有什么想法吗?
【问题讨论】: