# Fwd: Connect Rails app to elasticsearch server

**URL:** <https://discuss.elastic.co/t/fwd-connect-rails-app-to-elasticsearch-server/25985>\
**Category:** Elasticsearch\
**Created:** [July 21, 2015, 1:05pm UTC](https://discuss.elastic.co/t/fwd-connect-rails-app-to-elasticsearch-server/25985 "2015-07-21T13:05:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit\_Agarwal](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Ankit\_Agarwal](https://discuss.elastic.co/u/Ankit_Agarwal)\
**Post date:** [July 21, 2015, 1:05pm UTC](https://discuss.elastic.co/t/fwd-connect-rails-app-to-elasticsearch-server/25985/1 "2015-07-21T13:05:43Z")

</div>

I am using logstash+elasticsearch to index server logs. The Elasticsearch  
server is running at localhost:9200 with millions of server log docs.  
I also have a Rails app running at localhost:3000. I need to connect this  
rails app to the ES server.

I have read about the _"elasticsearch-rails"_ gem but everywhere i found  
them using ActiveRecords/ Models. However, i don't think ActiveRecords are  
required for this. I just need a way to query the ES server index and fetch  
the documents inside my Rails app.

Is there a way to do this? Can anyone please help me with this situation?  
please comment if I am not clear with my question.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [July 21, 2015, 2:46pm UTC](https://discuss.elastic.co/t/fwd-connect-rails-app-to-elasticsearch-server/25985/2 "2015-07-21T14:46:08Z")

</div>

You have already asked this question in another thread: [Connect Rails app to elasticsearch server](https://discuss.elastic.co/t/connect-rails-app-to-elasticsearch-server/25978)

Please stick to one thread per question otherwise discussions become disjointed

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [July 21, 2015, 2:46pm UTC](https://discuss.elastic.co/t/fwd-connect-rails-app-to-elasticsearch-server/25985/3 "2015-07-21T14:46:11Z")

</div>


