The problem with the passenger: "there is no such file to download" - / config / environment

I studied this and found links to similar problems here and there, but none of them led to a solution. I installed passenger (2.2.11) and nginx (0.7.64), and when I run things and hit the Rails URL, I get a page with a loading error message:

there is no such file to download - / path / to / app / config / environment

From what I found on the Internet, this seems to be some kind of user / permissions error, but I tried all the logical fixes: I made sure that /config/environment.rb does not belong to root, but using the webapp user. I tried setting user_default_user, I tried disabling user_user_switching. I even tried to configure the nginx user, although this does not really matter. I got some excellent results, but nothing worked. I hope someone can have a magical combination of settings and permissions for this. I can try to return to an earlier version of the Passenger because I have never had this problem before; it was a bit since I set up the Passenger, though.

Thanks for any suggestions.

EDITED: see below the answer I came across.

+5
source share
2 answers

Naturally, I just needed to ask a question in order to stumble upon an answer. To provide information to anyone looking for this issue, I will post here a few details.

Relevant lines from nginx.conf file:

user www data; # so that nginx does not start as root

www-data of passenger_default_user; # also for passengers

root / opt / foo / app / current / public;

, , www-, config/environment.rb, , -, , , . , _default_user ? , , .

, , www- - 0700, .

+2

Rack to Rails. config.ru Rails, Passenger Rack. . , config/environment - .rb, Rails.

config.ru , .

+1

All Articles