2
我正嘗試構建並運行團隊成員爲類項目編寫的ruby代碼。文件包含未知格式的數據(運行時錯誤)
這是我得到的錯誤:
PS C:\users\bryan\Team6\PlanetDefense> ruby main.rb
C:/Ruby192/lib/ruby/gems/1.9.1/gems/gosu-0.7.41-x86-mingw32/lib/gosu/patches.rb:36:in
'initialize': File contains data in an unknown format. (RuntimeError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/gosu-0.7.41-x86-mingw32/lib/gosu/patches.rb:36:in `initialize'
from C:/users/bryan/Team6/PlanetDefense/classes/playstate.rb:9:in `new'
from C:/users/bryan/Team6/PlanetDefense/classes/playstate.rb:9:in `initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/chingu-0.8.1/lib/chingu/game_state_manager.rb:300:in `new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/chingu-0.8.1/lib/chingu/game_state_manager.rb:300:in `game_state_instance'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/chingu-0.8.1/lib/chingu/game_state_manager.rb:148:in `push_game_state'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/chingu-0.8.1/lib/chingu/helpers/game_state.rb:37:in `push_game_state'
from main.rb:22:in `initialize'
from main.rb:56:in `new'
from main.rb:56:in `<main>'`
這似乎是有問題的代碼:
class Gosu::Song
alias initialize_ initialize
def initialize(*args)
args.shift if args.first.is_a? Gosu::Window
initialize_(*args)
end
end
對什麼是「數據未知格式」是任何想法?我GOOGLE了,不能拿出任何東西?謝謝您的幫助。