Installing id3lib-ruby on OS X Snow Leopard
Posted by Daniel on 10/30/2009I've got a rather large MP3 library, and it has started to become cluttered and unorganized. I decided to create a Ruby script that utilizes the id3lib-ruby gem. There are a few other options out there, but id3lib-ruby is a wrapper for the C library id3lib. It is pretty much full featured, allowing me to embed an album cover image directly in the MP3. I did have some trouble getting it installed however. Here is what I had to do to get it installed:
Install id3lib via MacPortsdwestendorf$ sudo port install id3lib ---> Computing dependencies for id3lib ---> Fetching gperf ---> Attempting to fetch gperf-3.0.4.tar.gz from http://distfiles.macports.org/gperf ---> Verifying checksum(s) for gperf ---> Extracting gperf ---> Configuring gperf ---> Building gperf ---> Staging gperf into destroot ---> Installing gperf @3.0.4_0 ---> Activating gperf @3.0.4_0 ---> Cleaning gperf ---> Fetching libiconv ---> Attempting to fetch libiconv-1.13.tar.gz from http://mirrors.kernel.org/gnu/libiconv ---> Verifying checksum(s) for libiconv ---> Extracting libiconv ---> Applying patches to libiconv ---> Configuring libiconv ---> Building libiconv ---> Staging libiconv into destroot ---> Installing libiconv @1.13_0 ---> Activating libiconv @1.13_0 ---> Cleaning libiconv ---> Fetching zlib ---> Attempting to fetch zlib-1.2.3.tar.bz2 from http://www.zlib.net/ ---> Verifying checksum(s) for zlib ---> Extracting zlib ---> Applying patches to zlib ---> Configuring zlib ---> Building zlib ---> Staging zlib into destroot ---> Installing zlib @1.2.3_3 ---> Activating zlib @1.2.3_3 ---> Cleaning zlib ---> Fetching id3lib ---> Attempting to fetch id3lib-3.8.3.tar.gz from http://voxel.dl.sourceforge.net/id3lib ---> Verifying checksum(s) for id3lib ---> Extracting id3lib ---> Applying patches to id3lib ---> Configuring id3lib ---> Building id3lib ---> Staging id3lib into destroot ---> Installing id3lib @3.8.3_1 ---> Activating id3lib @3.8.3_1 ---> Cleaning id3libInstall the id3lib-ruby gem, with options
dwestendorf$ sudo env ARCHFLAGS="-arch x86_64" gem install id3lib-ruby -- --with-opt-dir=/opt/local Building native extensions. This could take a while... Successfully installed id3lib-ruby-0.5.0 1 gem installed Installing ri documentation for id3lib-ruby-0.5.0... Installing RDoc documentation for id3lib-ruby-0.5.0...Test to see if it works
dwestendorf$ irb >> require 'id3lib' => true
Success!

Just what I needed. Thanks for sharing!
01/13/2010
You = super
01/22/2010