How to test ElasticSearch in a Rails application (Rspec)

Prefixing your index-names for the current environment You could set a different index-name for each environment (in your case: the test environment). For example, you could create an initializer in config/initializers/tire.rb with the following line: Tire::Model::Search.index_prefix “#{Rails.application.class.parent_name.downcase}_#{Rails.env.to_s.downcase}” A conceivable approach for deleting the indexes Assuming that you have models named Customer, Order and Product, put … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)