Skip to content

metabase/metabase-ruby-static-embedding-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metabase Ruby static embedding sample

This sample code demonstrates using Metabase static embedding in Ruby using Sinatra.

Running this sample

Pre-requisites

Preparing the embed

  1. Sign in to your Metabase instance as an admin.
  2. Go to admin settings and enabling embedding.
  3. Under admin settings/embedding, click on static embedding and copy the embedding secret key.

Configure the app

  1. Paste the secret key into an env var: $ export METABASE_EMBEDDING_SECRET="PASTE_SECRET_HERE"
  2. Create an env var pointing to your Metabase site URL, if it's not on http://localhost:3000 $ export METABASE_SITE_URL="http://localhost:4000"
  3. Create an env var with the ID of the dashboard to embed: $ export METABASE_EMBED_DASHBOARD_ID="8"
  4. Install dependencies: $ bundle install

Embed the dashboard

  1. Go to your dashboard, click on the share/embed button at the top
  2. Click on the "Publish" button
  3. Install the dependencies: $ bundle install
  4. Start the server: $ ruby app.rb
  5. Open the app in your browser at http://localhost:4567

Reporting issues

Please report bugs or feature requests as issues in this repository. Please do not report security vulnerabilities on the public GitHub issue tracker. Our Security Policy describes the procedure for disclosing security issues.

Author

Metabase

License

This project is licensed under the MIT license. See the LICENSE file for more info.

About

Metabase Static Embedding Sample for Ruby (Sinatra)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages