Docker – Postgres and pgAdmin 4 : Connection refused

Pgadmin fails to connect to localhost, but psql works from outside docker. both pgadmin & Postgres are running as Containers Although you haven’t indicated if you are doing so, ideally both containers could be part of a custom bridge network for automatic DNS resolution. If not added explicitly they will be part of the default bridge network. …

Docker – Postgres and pgAdmin 4 : Connection refused Read More »

How to add file in rails?

Undefined method `attachment_path or URL for # Solved:- Use this code in output file. <%if orders.avatar.attached?%> <%= image_tag main_app.url_for(orders.avatar) %> <%end%> if you want to save the image URL in the database you can add this to your controller or model. :- main_app.url_for(model.”has_one_attached attribute name” ex:-avtar) Edit image size:- variant(resize: “200×400”) <%= image_tag main_app.url_for(orders.avatar.variant(resize: “200×400”)) …

How to add file in rails? Read More »