Rav Johal
Rav Johal

Reputation: 374

AudioInfo Is not recognized (ruby-audioinfo gem)

I get the following error when trying to use the AudioInfo class (that comes with the ruby-audioinfo gem):

uninitialized constant PlaylistsController::AudioInfo

I have bundled the gem. Have restarted my server as well. Mp3Info seems to be working fine as I am using ruby-mp3info gem as well. Using rails 4 and latest gem version: https://github.com/moumar/ruby-audioinfo

Upvotes: 1

Views: 222

Answers (1)

Jason Berry
Jason Berry

Reputation: 11

You need to require the gem for your PlaylistsController class. Try putting this at the top of your file:

    require 'audioinfo'

Upvotes: 1

Related Questions