0

I have a server where I run a Decidim application built in Ruby on Rails. I aim to use Nginx and Passenger to deploy it, but I'm receiving a 403 Forbidden error. The nginx.conf content is below:

worker_processes  1;

events {
    worker_connections  1024;
}


http {
    passenger_root /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/passenger-6.0.17;
    passenger_ruby /root/.rbenv/shims/ruby;
    include       mime.types;
    default_type  application/octet-stream;
    passenger_app_env development;

    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;
        root /var/www/decidim_application/public;
        passenger_enabled on;
    }
}

I tried to configure the nginx.conf in several ways, but none of them worked for me.

UPDATE: The log information of Ruby on Rails is below.

DEPRECATION WARNING: Initialization autoloaded the constants Decidim::Meetings::CloseMeetingReminderGenerator and Decidim::Budgets::OrderReminderGenerator.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload Decidim::Meetings::CloseMeetingReminderGenerator, for example,
the expected changes won't be reflected in that stale Class object.

These autoloaded constants have been unloaded.

In order to autoload safely at boot time, please wrap your code in a reloader
callback this way:

    Rails.application.reloader.to_prepare do
      # Autoload classes and modules needed at boot time here.
    end

That block runs when the application boots, and every time there is a reload.
For historical reasons, it may run twice, so it has to be idempotent.

Check the "Autoloading and Reloading Constants" guide to learn more about how
Rails autoloads and reloads.
 (called from <main> at /var/www/decidim_application/config/environment.rb:5)
  • You'd need to check the Rails app logs. They are usually in `log/production.log` inside where your app code lives. (feel free to share them here, along side with the nginx, check the documentation to determine where those live) – Greg May 24 '23 at 15:08
  • Thank you for your reply. I added the log information above. – Diogo Almeida May 29 '23 at 13:01
  • Deprecation warning should not result in 40X error. Do you see any other exceptions there? – Greg May 29 '23 at 16:03

0 Answers0