kylejginavan / youtube_it

An object-oriented Ruby wrapper for the YouTube GData API
http://groups.google.com/group/ruby-youtube-library
595 stars 223 forks source link

Can't get youtube_it initialized in my controller #222

Closed martynbiz closed 10 years ago

martynbiz commented 10 years ago

I added the gem to my Gemfile, and run bundle install. When I do bundle query --local I can see that the gem is preset (version 2.1.4).

So, according to the README it seems to me I should do something like this in my controller?

class ConsoleController < ApplicationController
. . .

def search require 'youtube_it' client = YouTubeIt::Client.new(:dev_key => "my developer key") end end

But I get "cannot load such file -- youtube_it" error

If I remove the require function, I get "uninitialized constant ConsoleController::YouTubeIt" error.

What am I doing wrong? Btw I'm using Rails 4, Ruby v2