Config Tire to work with Bonsai ElasticSearch Heroku add-on
问题 So I have a rails 3.2 app. I created an index. I followed this guide: https://gist.github.com/nz/2041121 to create an bonsai.rb file in config/initializers/bonsai.rb It looks like this: ENV['ELASTICSEARCH_URL'] = ENV['BONSAI_URL'] # Optional, but recommended: use a single index per application per environment. # Caveat: This convention not be entirely supported throughout Tire's API. app_name = Rails.application.class.parent_name.underscore.dasherize app_env = Rails.env INDEX_NAME = "#{app