【问题标题】:Ruby gamebox can't find the file gosu.for_1_9.so even though it's right thereRuby gamebox 找不到文件 gosu.for_1_9.so 即使它就在那里
【发布时间】: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”,这真的不是我的首选。

有什么想法吗?

【问题讨论】:

    标签: ruby gem libgosu


    【解决方案1】:

    肯,

    正在找到该文件,但不兼容在 Ruby 2.0.0 中加载。

    这是 Gosu 的错误/缺失功能。它不适用于 Windows 上的 Ruby 2.0.0。 gem 的作者已计划解决此问题,但尚未解决。你可以在 Github 上跟进这个问题:https://github.com/jlnr/gosu/issues/163

    作者可以在#gosu的freenode IRC上找到。我相信他们可以在 Windows 支持方面使用一些帮助。不幸的是,在 Windows 上使用 Gamebox 的答案是降级到 Ruby 1.9.3。我会将其添加到 Gamebox wiki。

    【讨论】:

    • 问题是,它确实在 Ruby 2.0 中工作;我让它在另一个盒子上工作得很好。
    • 这个盒子和可以正常工作的盒子有什么区别?我在使用 Ruby 2.0.0 的 Windows 7 上遇到了完全相同的错误。它们都是Windows 8吗?他们都是32位的吗?使用相同的 Ruby 安装程序?等
    【解决方案2】:

    我同意@Shawn42

    但最好的方法可能是预先安装一个 ruby​​ 版本管理器。

    带有 Pik 的 RVM 是我在 Windows 上使用的。

    这样您就可以安装旧的 1.9.3 版 ruby​​ 并在您想使用 gamebox 时调用 pik 来使用该版本。您仍将安装 ruby​​ 2.0.0 并准备好用于您的其他项目。

    http://www.ruby-on-rails-outsourcing.com/articles/2010/07/28/ruby-version-manager-for-windows/

    干杯

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-08-13
      • 1970-01-01
      • 1970-01-01
      • 2020-04-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多