ifdef::env-github[] NOTE: For the best reading experience, please view this documentation at https://www.elastic.co/guide/en/apm/agent/ruby/current/introduction.html[elastic.co] endif::[] [[getting-started-rails]] === Getting started with Rails [float] ==== Setup Add the gem to your `Gemfile`: [source,ruby] ---- gem 'elastic-apm' ---- Create a file `config/elastic_apm.yml`: [source,yaml] ---- server_url: http://localhost:8200 secret_token: '' ---- This automatically sets up error logging and performance tracking but of course there are knobs to turn if you'd like to. See <>.