You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/DEVCONTAINER.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,3 +148,29 @@ bundle install
148
148
```
149
149
150
150
This has been observed particularly when using RubyMine.
151
+
152
+
### Issues connecting to the database
153
+
154
+
For example:
155
+
156
+
```
157
+
ActiveRecord::DatabaseConnectionError: There is an issue connecting with your hostname: postgres. (ActiveRecord::DatabaseConnectionError)
158
+
```
159
+
160
+
This can be caused by incompatible versions of Postgres software and data, such as when the version of Postgres changes but the data is not upgraded to the new version's format.
161
+
162
+
If this is the case, the simplest fix is to reset the Postgres data volume. Run these commands from the host environment (not within the container environment):
163
+
164
+
1. The volume will be called `open_street_map_postgres-data` or similar.
165
+
2. Find the container associated to it with `docker ps -a --filter volume=open_street_map_postgres-data`
166
+
3. Delete the container by id with `docker rm $CONTAINER_ID`.
167
+
4. Delete the volume with `docker volume rm open_street_map_postgres-data`.
168
+
5. Try now and see if things work.
169
+
170
+
Or for a one-liner (requires the tool `jq` to be installed):
Note that this will delete all data in the database! If you want to keep it, you will need to use Postgres's own tools to perform the data upgrade. That process is not described in this guide.
0 commit comments