无法成功安装rubygame

时间:2012-11-23 03:33:07

标签: ruby macos gem rubygame

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

    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'

我该怎么办?

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

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