You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@aakashbarot To this date I have not found a solution but I did find a workaround.
This behavior happened when creating a new project and trying to replicate the integration with API.AI that I had previously accomplished on another project.
I was unable to accomplish the integration, the weird thing is that after cloning my previous project with the same config it did work.
I'm getting the following error when trying to activate the controller action that executes the api call:
`NameError (uninitialized constant MyController::ApiAiRuby):
app/controllers/maya_controller.rb:5:in
my_action' Rendering /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout Rendering /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/_source.html.erb Rendered /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (5.5ms) Rendering /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb Rendered /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.3ms) Rendering /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb Rendered /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms) Rendered /var/lib/gems/2.3.0/gems/actionpack-5.0.6/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (22.9ms)
My controller looks as follows:
class MyController < ApplicationController
skip_before_action :verify_authenticity_token
def my_action
client = ApiAiRuby::Client.new(
:client_acess_token => '###############################'
)
response = client.text_request "#{params[:transcript]}"
result = response[:result]
Rails.logger.debug("#{response}")
respond_to do |format|
format.js {}
end
end
end
It blocks the request to API.AI what is going on?
The text was updated successfully, but these errors were encountered: