Hi Richard, 

Were you able to get this fixed? Running into the same issue using Rails. 

Getting a load error - 'cannot load such file -- adwords_api'

I am requiring the 'adwords_api' file in the controller when getting this 
error. 

Would be great to know how you fixed this issue. 

Thanks

Arjun




On Thursday, July 9, 2015 at 7:00:32 PM UTC+5:30, Michael Cloonan (AdWords 
API Team) wrote:
>
> Hello Rick,
>
> We have an example app in Rails that might be helpful: 
> https://github.com/googleads/google-api-ads-ruby/tree/master/adwords_api/examples/adwords_on_rails
>
> As for your specific error, if you don't specify a location for the config 
> file, the client library will look in ENV['HOME'], not in your rails root 
> directory. Take a look in the example's ApplicationController, in the 
> create_adwords_api 
> method 
> <https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/adwords_on_rails/app/controllers/application_controller.rb#L42>.
>  
> Here, when instantiating the API, it passes the full file path so that it 
> looks in the correct directory.
>
> Regards,
> Mike, AdWords API Team
>
> On Wednesday, July 8, 2015 at 3:20:14 PM UTC-4, Richard Henry wrote:
>>
>> Hi,
>>
>> I am new to the AdWords API and I am using rails and will use the Client 
>> Library provided. I am trying to integrate it with the Rails framework and 
>> I've setup my adwords_api.yml in the config file and tried to require this 
>> in my controller but I keep getting:
>>
>> cannot load such file -- 
>> /Users/Richard/Desktop/wdi_13/projects/final_project/clean_project/adwords_app/config/adwords_api
>>
>> my controller code is:
>>
>> require "#{Rails.root}/config/adwords_api"
>>
>> class ReportsController < ApplicationController
>>   
>>   def index
>>     adwords = AdwordsApi::Api.new
>>     token = adwords.authorize()
>>   end
>>
>>
>> end
>>
>> I've looked into it and i thought it may be something to do with the 
>> path, which is why I have the Rails.root there but the path with this is 
>> definitely correct.
>>
>> Any help would be greatly appreciated!
>>
>> Thanks,
>> Rick
>>  
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b62b4b18-97d3-4f26-a4d5-27b79d3b9568%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Re: Rails Adwor... Arjun Rajkumar
    • Re: Rails ... 'Michael Cloonan (AdWords API Team)' via AdWords API Forum

Reply via email to