我正在尝试使用taglib-ruby gem从音频文件中获取ID3文件信息,如此...
# Load a file
TagLib::MPEG::File.open path_to_audio_file do |fileref|
unless fileref.null?
data = {}
data['tag'] = fileref.tag
data['properties'] = fileref.audio_properties
end
end
但是我收到了这个错误(下面)
重载方法'File.new'.Possible C / C ++的错误参数 原型是:File.new(TagLib :: FileName文件,bool readProperties, TagLib :: MPEG :: Properties :: ReadStyle propertiesStyle) File.new(TagLib :: FileName文件,bool readProperties) File.new(TagLib :: FileName文件)File.new(TagLib :: FileName文件, TagLib :: ID3v2 :: FrameFactory * frameFactory,bool readProperties, TagLib :: MPEG :: Properties :: ReadStyle propertiesStyle) File.new(TagLib :: FileName文件,TagLib :: ID3v2 :: FrameFactory * frameFactory,bool readProperties)File.new(TagLib :: FileName文件,TagLib :: ID3v2 :: FrameFactory * frameFactory)
任何想法可能导致此错误?