How to remove the "This site is in development mode!" message with local QPixel? Question
How to remove the following red message (see also the picture below) displayed on the top of each pages when running a local instance of QPixel?
This site is in development mode!
In addition, is this message automatically removed when the soft is in "operation on a server"[1], even if it is running on a private network?
-
I'm not sure about the words in double quotes here but I mean what it is described in this post ↩︎
1 answer
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
zetyty | (no comment) | Jul 4, 2023 at 07:08 |
In general: if you are seeing that message you have not configured your instance to be in production mode. The warning is there because certain protections and checks are not enabled in development mode, and it should not be used like that in production.
When running in production mode, the message will automatically disappear. You can start the server in production mode by running bundle exec rails s -e production
. If you are using the docker set-up, there is a config file which allows you to set a so-called environment. Change it to production
and it should do the same. Note that settings like where files are stored and which database credentials to use are also distinct per environment.
If despite all the above you still want to forcibly remove the message:
Do not do this for production instances!
In the file `app/views/layouts/_header.html.erb` ~ line 282-288, remove the block of code which renders it:<% if Rails.env.development? %>
<div class="notice is-danger is-banner has-padding-2 notice__dev-mode has-color-red-900">
<div class="container">
<p>This site is in development mode!</p>
</div>
</div>
<% end %>
1 comment thread