
As far as I can tell it is in production, it uses the environments/production.rb file (I can tell because there is a side effect that the other environments do not have) and even if it is forced in environment.rb, ENV['RAILS_ENV'] = 'production', I still get database logging On Mon, 30 Oct 2023 at 14:44, Anton Shchankin via ruby-talk < ruby-talk@ml.ruby-lang.org> wrote:
Hello, Peter! I suggest to explore environment variables on old machine. Anyway you can setup log level for you application: https://guides.rubyonrails.org/v3.2/configuring.html
Another possible source of the problem is that you application runs in development mode instead of production.
30.10.2023 17:16, Peter Hickman via ruby-talk пишет:
I have this old app, Ruby 1.8.7, Rails 2.3.2, that runs on Ubuntu 1404. It is old, rock solid and undocumented. We are going to rewrite it but at present we have dockerised it as is because we feared that the host that runs it (also very old) may simply die
So we build a container around 14.04, compiled ruby 1.8.7 and installed the necessary gems. Fired it up and pointed the load balancer at it. It is working just fine and we can finally breath. To be clear the container only contains the Rails app and the unicorn_rails application server, the rest of the stack, Nginx and the database, live in their own 22.04 containers
Now the odd part, despite the application running in production mode it logs like it is in development mode and the logs are bloated with all the database activity. The log files are a minimum 2/3 database logging. The old installation doesn't do this
For the life of me I can not work out how to stop the database logging
Any ideas?
______________________________________________ ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org ruby-talk info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-talk.ml.ruby-lang.org...
ruby-talk mailing list -- ruby-talk@ml.ruby-lang.org To unsubscribe send an email to ruby-talk-leave@ml.ruby-lang.org ruby-talk info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-talk.ml.ruby-lang.org...