Problem with Ruby + rtaglib gem
I need to read ID3 tags from MP3 files, so i did some research and found that rtaglib is the way to go. The other plugins seems outdated, i tried them anyways but none of them work for me.
After installed the rtaglib gem (the ruby binding for TagLib http://developer.kde.org/~wheeler/taglib.html#bindings) i just can't make it work.
I tried adding both the gem to the gemfile and install it with sudo gem install rtaglib. I get the response like it's installed, but after that when i tried to require any of the two files i get:
?> require 'tagfile/tagfile'
LoadError: no such file to load -- tagfile/tagfile
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in
require'
Or if i tried TagLib:
开发者_开发百科require 'TagLib' => nil
I have tried to move the files manually from the zip file but that doesn't zip to work neither.
Thank you.
If you are using Ubuntu you must install libtagc0-dev first, THEN install the gem.
At first I made the mistake of installing libtag1-dev, which gave me the same problem as you have.
Make sure that you are including rubygems as well. If you are doing this from a Rake task or ruby script:
require 'rubygems'
require 'tagfile/tagfile'
I am doing this on OSX with the gem and taglib installed via homebrew and it works fine.
精彩评论