skip to Main Content

The top left timing in my react app is hiding contents in my app and I don’t know how to remove it.

enter image description here

This is my truncated Gemfile. There isn’t anything to do with time.

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
    
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'
end

3

Answers


  1. This is provided by the gem rack-mini-profiler which actually has a lot of useful information for debugging sql queries. If you don’t want it just remove the line or comment it out and run bundle install again.

    # Comment out or remove line completely
    # gem 'rack-mini-profiler'
    

    In the console/terminal

    bundle install
    

    …and finally don’t forget to restart the server.

    Login or Signup to reply.
  2. I agree, it’s in a horrible location, thankfully, you can change it’s location with an initializer in config/initializers/

    https://github.com/MiniProfiler/rack-mini-profiler#configuration-options

    Rack::MiniProfiler.config.position = 'bottom-right'
    
    Login or Signup to reply.
  3. To elaborate on fatfrog’s answer: You can move it to another corner. Your options are ‘top-right’, ‘top-left’, ‘bottom-right’ or ‘bottom-left’. In your project, create a file in config/initializers named mini-profiler.rb, and add these contents:

    Rack::MiniProfiler.config.position = 'bottom-left'
    

    Restart the server and request a page.

    See this link for more info https://stackify.com/rack-mini-profiler-a-complete-guide-on-rails-performance/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search