Hi,
Strange one here. I’m using the Ruby API to automate the creation of projects from project templates and it appears the ‘project_templates’ method can’t be found.
I’m just doing a simple get template as defined in the Asana API docs with:
result = client.project_templates.get_project_template(project_template_gid: ‘xxxxxxxxxxxxxxxxxxx’, options: {pretty: true})
And the error I get back is that ‘project_templates’ is undefined as in:
<main>': undefined method project_templates’ for #<Asana::Client:0x000000011115c720 @http_client=#<Asana::HttpClient:0x000000011115c3b0 @authentication=#<Asana::Authentication::OAuth2::BearerTokenAuthentication:0x000000011115c518 @token=“xxxxxxxxxxxxxxxxx”>, @adapter=:net_http, @environment_info=#<Asana::HttpClient::EnvironmentInfo:0x000000011115c2c0 @user_agent=“ruby-asana v2.0.0”, @openssl_version=“OpenSSL 1.1.1n 15 Mar 2022”, @client_version=“2.0.0”, @os=“darwin”>, @debug_mode=nil, @log_asana_change_warnings=true, @default_headers=nil, @config=nil>> (NoMethodError) result = client.project_templates.get_project_template(project_template_gid: ‘1203358303276849’, options: {pretty: true}) ^^^^^^^^^^^^^^^^^^ Did you mean? project_statuses
This is strange. I’ve checked I’m using the latest version of the ruby-asana library (v2.0.0 see GitHub - Asana/ruby-asana: Official Ruby client library for the Asana API v1) and I’ve also checked the libraries that this method is there (ruby-asana/project_templates_base.rb at 99920daab813c8b4a127fbee0c10017210efd7e0 · Asana/ruby-asana · GitHub). Everything seems in order but it’s not working.
Any ideas why Asana is throwing this error?
Thanks,
Ian
Hi,
Strange one here. I’m using the Ruby API to automate the creation of projects from project templates and it appears the ‘project_templates’ method can’t be found.
I’m just doing a simple get template as defined in the Asana API docs with:
result = client.project_templates.get_project_template(project_template_gid: ‘xxxxxxxxxxxxxxxxxxx’, options: {pretty: true})And the error I get back is that ‘project_templates’ is undefined as in:
<main>': undefined method project_templates’ for #<Asana::Client:0x000000011115c720 @http_client=#<Asana::HttpClient:0x000000011115c3b0 @authentication=#<Asana::Authentication::OAuth2::BearerTokenAuthentication:0x000000011115c518 @token=“xxxxxxxxxxxxxxxxx”>, @adapter=:net_http, @environment_info=#<Asana::HttpClient::EnvironmentInfo:0x000000011115c2c0 @user_agent=“ruby-asana v2.0.0”, @openssl_version=“OpenSSL 1.1.1n 15 Mar 2022”, @client_version=“2.0.0”, @os=“darwin”>, @debug_mode=nil, @log_asana_change_warnings=true, @default_headers=nil, @config=nil>> (NoMethodError) result = client.project_templates.get_project_template(project_template_gid: ‘1203358303276849’, options: {pretty: true}) ^^^^^^^^^^^^^^^^^^ Did you mean? project_statusesThis is strange. I’ve checked I’m using the latest version of the ruby-asana library (v2.0.0 see GitHub - Asana/ruby-asana: Official Ruby client library for the Asana API v1) and I’ve also checked the libraries that this method is there (ruby-asana/project_templates_base.rb at 99920daab813c8b4a127fbee0c10017210efd7e0 · Asana/ruby-asana · GitHub). Everything seems in order but it’s not working.
Any ideas why Asana is throwing this error?
Thanks,
Ian