Install
Add the gem to your host app:config/initializers/search_engine.rb:
Requirements
- Ruby >= 3.1, Rails >= 6.1
- Dependency:
typesense >= 4.1.0(pulled automatically, but may conflict withbase64gem — requires v0.2.0) - A running Typesense server reachable at
host:portoverprotocolwith a valid API key
Environment variables
TYPESENSE_HOST(e.g.,localhost)TYPESENSE_PORT(e.g.,8108)TYPESENSE_PROTOCOL(httporhttps)TYPESENSE_API_KEY(never commit to source control)
Post‑install checklist
- Bundle and boot your app.
- Verify configuration without leaking secrets:
- Run a smoke search against your Typesense server: