views:

23

answers:

1

When trying to use the FFMPEG gem on Mac OS X 10.6, ruby throws a NameError exception like so:

NameError: uninitialized constant FFMPEG

My code is rather simple:

class Parser
    def initialize(file)
        require 'ffmpeg';
        @video = FFMPEG::InputFormat.new(file);
    end
end

I have ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.4.0], local gems installed: ffmpeg-ruby (0.1.0), rmagick (2.13.1), rubygems-update (1.3.7)

This happens both on the irb and on my script.

Thanks for whatever help you can provide!

+1  A: 

there are two wrapper libs around ffmpeg using the same name if you used gem install ffmpeg-ruby you propably got this version (http://github.com/hackerdude/ffmpeg-ruby)

which uses the prefix FFMpeg not FFMPEG

Nikolaus Gradwohl
Actually I downloaded this one http://github.com/gwik/ffmpeg-ruby but apparently some updating made it download the one you just pointed out. That pretty much made ruby explode and so on. Thanks for pointing this out!
Rob