1

我的操作系统是 OSX 10.8.2。我已按照ruby​​game wiki的说明进行操作,安装过程中一切正常。但是,当我在我的 ruby​​ 脚本中需要 ruby​​game 时,发生了一些事情:

    irb(main):001:0> require 'rubygame'
    ArgumentError: callbacks cannot have variadic parameters
from /Library/Ruby/Gems/1.8/gems/ffi-1.2.0/lib/ffi/library.rb:365:in `callback'
from /Library/Ruby/Gems/1.8/gems/ruby-sdl-ffi-0.4/lib/ruby-sdl-ffi/sdl/mac.rb:161
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/ruby-sdl-ffi-0.4/lib/ruby-sdl-ffi/sdl.rb:80
from /Library/Ruby/Gems/1.8/gems/ruby-sdl-ffi-0.4/lib/ruby-sdl-ffi/sdl.rb:67:in `each'
from /Library/Ruby/Gems/1.8/gems/ruby-sdl-ffi-0.4/lib/ruby-sdl-ffi/sdl.rb:67
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame/main.rb:22
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame.rb:44
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame.rb:29:in `each'
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame.rb:29
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'

我应该怎么办?

4

2 回答 2

1

为我修好了。但基本上 ruby​​-sdl-ffi 和 Rubygame 看起来没有维护。我建议不要使用它们,除非有人采用这些项目。

于 2013-01-21T18:13:59.323 回答
0

在我看来,这一定是您给出的链接上的版本问题,他们只提到了 10.5 和 10.3。您必须检查更新日志是否有新更改,有时可能会发生

于 2012-11-23T05:45:50.190 回答