gems madness - require path hoopty?

G

Giles Bowkett

There's a nifty gem called MP4Info which enables you to get ID3-style
metadata from non-MP3 files, such as AAC files. It's dag gol darn
usefulness and then some, but my attempts at requiring it were
troubled.

This works:

sudo gem install MP4Info

This works:

require '/opt/local/lib/ruby/gems/1.8/gems/MP4Info-0.3.1/lib/mp4info'

These don't:

sudo gem install mp4info
require 'mp4info'
require 'MP4Info'
require 'MP4Info-0.3.1'
require 'MP4Info-0.3.1/lib/mp4info'

Besides a test script and a few bits of test data, .wav files etc.,
mp4info.rb is basically the only file in the gem. Is there anything
obvious I'm missing here?

--
Giles Bowkett

Podcast: http://hollywoodgrit.blogspot.com
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com
 
L

Luis Lavena

There's a nifty gem called MP4Info which enables you to get ID3-style
metadata from non-MP3 files, such as AAC files. It's dag gol darn
usefulness and then some, but my attempts at requiring it were
troubled.

This works:

sudo gem install MP4Info

This works:

require '/opt/local/lib/ruby/gems/1.8/gems/MP4Info-0.3.1/lib/mp4info'

These don't:

sudo gem install mp4info
require 'mp4info'
require 'MP4Info'
require 'MP4Info-0.3.1'
require 'MP4Info-0.3.1/lib/mp4info'

Besides a test script and a few bits of test data, .wav files etc.,
mp4info.rb is basically the only file in the gem. Is there anything
obvious I'm missing here?

D:\Users\Luis>gem search --remote mp4info

*** REMOTE GEMS ***
Need to update 19 gems from http://gems.rubyforge.org
....................
complete

MP4Info (0.3.1, 0.3, 0.2, 0.1)
MP4 tag reading library

D:\Users\Luis>gem search --remote MP4info

*** REMOTE GEMS ***

MP4Info (0.3.1, 0.3, 0.2, 0.1)
MP4 tag reading library

D:\Users\Luis>gem install mp4info --no-ri --no-rdoc
Successfully installed MP4Info-0.3.1

D:\Users\Luis>irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'mp4info'
=> true
irb(main):003:0> M
MP4Info MatchData Math Module
Marshal MatchingData Method Mutex

HTH,

Luis
 
E

Eric Hodel

There's a nifty gem called MP4Info which enables you to get ID3-style
metadata from non-MP3 files, such as AAC files. It's dag gol darn
usefulness and then some, but my attempts at requiring it were
troubled.

[...]

Besides a test script and a few bits of test data, .wav files etc.,
mp4info.rb is basically the only file in the gem. Is there anything
obvious I'm missing here?

$ gem install MP4Info -i ~/tmp/gems
[...]
$ GEM_HOME=~/tmp/gems gem which mp4info
/Users/drbrain/tmp/gems/gems/MP4Info-0.3.1/lib/mp4info.rb
$ GEM_HOME=~/tmp/gems ruby -rubygems -e 'require "mp4info"'
$

There's nothing wrong with the gem.

a) You didn't require 'rubygems' before require 'mp4info'
b) `gem env`'s ruby doesn't match `which ruby`'s ruby.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,632
Members
45,340
Latest member
Thalia56P0

Latest Threads

Top