Ruby on Rails app deployed on Beanstalk is giving me error for API AI / Dialog Flow Gem:
NameError
uninitialized constant MessengerHireController::ApiAiRuby
I have the following code in my sidekiq Worker:
dialog_client = ApiAiRuby::Client.new(
:client_access_token => access_token,
:api_session_id => @freelancer.user.id
)
response = dialog_client.text_request msg
I have tested it in my regular controller and it doesnt work.
- I have moved it out of worker and to standard controller.
- It works on my local but not on beanstalk
- I ran rails console on beanstalk and tried the same code and it gave me error. I manually installed gem with
gem install 'api-ai-ruby'
After which it stopped giving me NameError on console, but still doesnt work on production. - I checked with
gem list
and the gem is installed on production.
My Biggest hypothesis is that the app is unable to find the installed gem.
Thank you in advance for help.