Elasticsearch for ruby on rails 's application

Hello,

I want to use an elasticsearch's plugin in a rails's application.
I installed all prerequis(elasticsearch , ruby on rails,
escargot ...).
I started to do configurations but this don't work yet .
I have some questions, i don't really understand how can i configure
elasticsearch for my application.
I have elasticsearch running in localhost:9200, and rails running in
localhost:3000, i added escargot's plugin in my application...

I do this :

class MyModele< ActiveRecord::Base
elastic_index
end

then this :
rake escargot:index

But when i want to run my application , i have this error:

undefined local variable or method `elastic_index' for MyModele(id...)

So , how can i do to make relation between elasticsearch and my
database, or it's automatic?

This sounds like a configuration issue, not an elasticsearch issue.
Anyway, you need to require escargot in the appropriate place.
Without looking at escargot, there maybe an initializer under the
"config" directory.

On Apr 7, 1:11 pm, kaisser saadabdi2...@gmail.com wrote:

Hello,

I want to use an elasticsearch's plugin in a rails's application.
I installed all prerequis(elasticsearch , ruby on rails,
escargot ...).
I started to do configurations but this don't work yet .
I have some questions, i don't really understand how can i configure
elasticsearch for my application.
I have elasticsearch running in localhost:9200, and rails running in
localhost:3000, i added escargot's plugin in my application...

I do this :

class MyModele< ActiveRecord::Base
elastic_index
end

then this :
rake escargot:index

But when i want to run my application , i have this error:

undefined local variable or method `elastic_index' for MyModele(id...)

So , how can i do to make relation between elasticsearch and my
database, or it's automatic?

I use Windows as system .
I started elasticsearch on command line and i installed escargot as a gem in
my applications ruby on rails , i can see that escargot is in the Librairies
of my application.

I understand that my message is about a configuration issue, but sorry i
just want to see where can i configure elasticserach in my application.

thank you

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/elasticsearch-for-ruby-on-rails-s-application-tp2791086p2792039.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

Hi

For more informations i use Windows as system .
After downloading elasticsearch I started it with command line .
Also i installed escargot as a gem in my application (ruby on rails's
application).
I can see that escargot is in Librairies repertory of my application.

I understand that my message is about a configuration issue, but sorry
i just want to see where can i configure elasticserach(escargot) for
use in my application.

thank you

On 7 avr, 15:59, vinny agnel...@gmail.com wrote:

This sounds like a configuration issue, not an elasticsearch issue.
Anyway, you need to require escargot in the appropriate place.
Without looking at escargot, there maybe an initializer under the
"config" directory.

On Apr 7, 1:11 pm, kaisser saadabdi2...@gmail.com wrote:

Hello,

I want to use an elasticsearch's plugin in a rails's application.
I installed all prerequis(elasticsearch , ruby on rails,
escargot ...).
I started to do configurations but this don't work yet .
I have some questions, i don't really understand how can i configure
elasticsearch for my application.
I have elasticsearch running in localhost:9200, and rails running in
localhost:3000, i added escargot's plugin in my application...

I do this :

class MyModele< ActiveRecord::Base
elastic_index
end

then this :
rake escargot:index

But when i want to run my application , i have this error:

undefined local variable or method `elastic_index' for MyModele(id...)

So , how can i do to make relation between elasticsearch and my
database, or it's automatic?