Closed martynbiz closed 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
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