To develop and test your application locally, you can use the Cloud Bigtable
Emulator, which provides
local emulation
of the production Cloud Bigtable environment. You can start the Cloud Bigtable
emulator using the gcloud command-line tool.
To configure your ruby code to use the emulator, set the
BIGTABLE_EMULATOR_HOST environment variable to the host and port where the
emulator is running. The value can be set as an environment variable in the
shell running the ruby code, or can be set directly in the ruby code as shown
below.
require"google/cloud/bigtable"# Make Bigtable use the emulatorENV["BIGTABLE_EMULATOR_HOST"]="localhost:8086"bigtable=Google::Cloud::Bigtable.new"emulator-project-id"
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [2.12.1 (latest)](/ruby/docs/reference/google-cloud-bigtable/latest/EMULATOR)\n- [2.12.0](/ruby/docs/reference/google-cloud-bigtable/2.12.0/EMULATOR)\n- [2.11.1](/ruby/docs/reference/google-cloud-bigtable/2.11.1/EMULATOR)\n- [2.10.2](/ruby/docs/reference/google-cloud-bigtable/2.10.2/EMULATOR)\n- [2.9.1](/ruby/docs/reference/google-cloud-bigtable/2.9.1/EMULATOR)\n- [2.8.0](/ruby/docs/reference/google-cloud-bigtable/2.8.0/EMULATOR)\n- [2.7.1](/ruby/docs/reference/google-cloud-bigtable/2.7.1/EMULATOR)\n- [2.6.5](/ruby/docs/reference/google-cloud-bigtable/2.6.5/EMULATOR) \n\nCloud Bigtable Emulator\n=======================\n\nTo develop and test your application locally, you can use the [Cloud Bigtable\nEmulator](https://cloud.google.com/bigtable/docs/emulator), which provides\n[local emulation](https://cloud.google.com/sdk/gcloud/reference/beta/emulators/)\nof the production Cloud Bigtable environment. You can start the Cloud Bigtable\nemulator using the `gcloud` command-line tool.\n\nTo configure your ruby code to use the emulator, set the\n`BIGTABLE_EMULATOR_HOST` environment variable to the host and port where the\nemulator is running. The value can be set as an environment variable in the\nshell running the ruby code, or can be set directly in the ruby code as shown\nbelow. \n\n```ruby\nrequire \"google/cloud/bigtable\"\n\n# Make Bigtable use the emulator\nENV[\"BIGTABLE_EMULATOR_HOST\"] = \"localhost:8086\"\n\nbigtable = Google::Cloud::Bigtable.new \"emulator-project-id\"\n```\n\nOr by providing the `emulator_host` argument: \n\n```ruby\nrequire \"google/cloud/bigtable\"\n\nbigtable = Google::Cloud::Bigtable.new emulator_host: \"localhost:8086\"\n```"]]