This Rails application demonstrates a simple, barebones Metabase dashboard embedded in a web application using static embedding.
-
Metabase. You should have already completed the setup detailed in the README for this repository, which shows you how to get an instance of Metabase up and running in the metabase directory of this repository.
-
Ruby. You'll need to have Ruby installed on your machine.
-
Bundler. Bundler will install the application's dependencies.
-
In a new terminal session,
cd
into this directory. -
Run
bundle install
to download the application's dependencies. -
Once the application dependencies are installed, run:
rails server -p 3001
Because Metabase runs on port 3000, we need to include the -p 3001
to bind the Rails server to a nonstandard port.
- Open your browser to localhost:3001.
Explore the app to learn more about embedding Metabase charts and dashboards in applications. You can also check out the links to more documentation in the parent repository's main README.
You can find example code for embedding Metabase in the app/controllers and app/views/stats directories.