Skip to content

Instantly share code, notes, and snippets.

@erickreutz
Created April 10, 2012 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erickreutz/2354837 to your computer and use it in GitHub Desktop.
Save erickreutz/2354837 to your computer and use it in GitHub Desktop.
Heroku and Elasticsearch with Tire
require 'uri'
if ENV['BONSAI_INDEX_URL'].present?
uri = URI( ENV['BONSAI_INDEX_URL'] )
Tire.configure {
url "#{uri.scheme}://#{uri.host}"
global_index_name uri.path[/[^\/]+$/]
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment