LoginSignup
0
1

More than 1 year has passed since last update.

アプリの左上に表示されるmsを非表示にしたい

Last updated at Posted at 2021-08-07

rack-mini-profilerについて

railsを起動したときに画面の左上にmsという表示がされることがあるのですが、これは
rack-mini-profilerというgemがインストールされているから表示されているということがわかりました。

image.png
このmsというのはサーバー側の処理の合計時間を示していて、クリックするとその内訳を見ることができます。サーバー側だけではなく、クライアント側の計測やsqlの処理なども確認することができます。
さて、これがあるとアプリのデザインがわかりにくいので非表示にしたいと思います。

Gemfile
group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 4.1.0'
  # Display performance information such as SQL time and flame graphs for each request in your browser.
  # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
  gem 'rack-mini-profiler', '~> 2.0' ← これをコメントアウトします
  gem 'listen', '~> 3.3'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

gem 'rack-mini-profiler', '~> 2.0'をコメントアウトしましょう。
あとはbundle installをすればmsを非表示にできます。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1