Closed zaidhuda closed 7 years ago
Hi @hudadiaz,
Could you try setting http_proxy: false
in ~/.hotel/conf.json
and then running hotel stop && hotel start
?
It adds HTTP_PROXY
env and may have some side effects.
Another things is that the process started by hotel
doesn't have the same environment variables than in your terminal. By default, it only copies PATH
.
So if the database client/rails makes use of an environment variable to connect to the database it could be an explanation (like RAILS_ENV
).
You can view and edit passed environment in ~/.hotel/servers/your-server.json
.
Another things is that the process started by hotel doesn't have the same environment variables than in your terminal. By default, it only copies PATH.
Adding required env variables solves the issue.
Glad it's solved 👍 What was the env variable (in case someone else has the same issue)?
It was the postgresql user and password. Looking back, the error was almost clear about that. 😄
Oh I see, thanks :)
I could not connect to postgresql when running my rails server through hotel. This is weird because I can start rails server using the same cmd(with fixed port) I set with hotel:
rails server --port $PORT -b 127.0.0.1
The error I got was:
Again, this does not happen when I run rails manually.