Search code examples
ruby-on-railsyoutube-apiruby-1.8.7

TypeError: Google is not a module


Im trying to implement google youtube api in my ruby on rails project as stated in youtube documentation https://developers.google.com/youtube/v3/code_samples/ruby#retrieve_my_uploads so this block of code require 'google/api_client' I get the following error "TypeError: Google is not a module"


Solution

  • This is the type of thing that will happen if you already have a class of your own called Google that isn't namespaced.

    I had the same problem as you TypeError: Google is not a module and then upon further investigation discovered I had a class called Google that was getting loaded first.