If you ever want to integrate a Google Search Appliance(GSA) into your rails application, try using the gem
You can simply download it with the command
gem install rails-gsa
Then after including it in you Gemfile you can start communicating with your GSA. This gem uses the API’s provided by the GSA and provides you search results.
Check out the complete documentation of the gem at https://github.com/rohit9889/rails-gsa