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"
Asked
Active
Viewed 1,169 times
2
-
Have you restarted your server since installing the gem? You'll need to. – Max Williams Jul 07 '14 at 11:53
-
Also can you include the relevant part of your code in your question? – Max Williams Jul 07 '14 at 11:54
-
@MaxWilliams yes I restarted it and tried to run the block of code in rails console and i get the same error,, this is the block of code [ require 'google/api_client' ] – Nasser Jul 07 '14 at 12:17
1 Answers
4
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.
![](../../users/profiles/59075.webp)
Darren Hicks
- 4,610
- 1
- 29
- 32