supabase-rb
Ruby client for Supabase. Single gem packaging Auth,
PostgREST, Storage, Edge Functions, and Realtime behind one
Supabase.create_client factory — mirroring
supabase-py's create_client().
gem "supabase-rb"require "supabase"
client = Supabase.create_client(supabase_url: ENV["SUPABASE_URL"],
supabase_key: ENV["SUPABASE_ANON_KEY"])Module references (the Ruby port mirrors supabase-py's module layout):
Relevant links:
- Gem: rubygems.org/gems/supabase-rb
- Documentation: supabase.com/docs
- Upstream Python source: supabase/supabase-py
Local Development
Clone the Repository
git clone https://github.com/supabase-ruby/supabase-rb.git
cd supabase-rbDependencies
- Ruby >= 3.0
- Docker & Docker Compose (for Auth integration tests against live GoTrue)
Setup
bundle installThe repo's Gemfile loads the single supabase-rb gemspec, which packages
every module under lib/supabase/.
Running tests
Auth integration specs need the GoTrue infrastructure on ports 9996–9999:
docker compose -f infra/docker-compose.yml up -dRun the full suite:
bundle exec rspecRun a single sub-library's specs:
bundle exec rspec spec/supabase/postgrest/
bundle exec rspec spec/supabase/storage/
bundle exec rspec spec/supabase/functions/
bundle exec rspec spec/supabase/realtime/
bundle exec rspec spec/supabase/client_spec.rb # umbrellaCoverage is generated by SimpleCov to coverage/index.html.
License
MIT