Skip to content

Commit

Permalink
Add directions on using binding.pry in the development environment to…
Browse files Browse the repository at this point in the history
… the ReadMe
  • Loading branch information
jacobyarborough committed Jan 26, 2024
1 parent 1f5ab4c commit 36caabf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ docker-compose exec web bin/rails db:migrate # update the Postgres server manage

If you encounter an error starting Docker processes like the above, you may have your own version of Postgres running in the background. You'll need to stop it in an environment-appropriate way, e.g. `sudo service postgresql stop` on Linux or `brew services stop postgresql` on Mac OS.

#### Using Pry Gem

If you want to stop execution while in the development enviroment by placing a <code>binding.pry</code> you can use the following commands:

1. Start the web app in development `docker-compose up web`
2. In a different terminal window list the running containers `docker ps`
![MCAChicago sample image T.Y.F.F.S.H](doc_assets/docker_ps_command.png "Screenshot of the docker ps command output. List of running containers. First column: 'Container ID', second column: 'Image', third column: 'Created', fourth column: 'Status', fith column: 'Ports', sixth column: 'Names'.")
*Screenshot output of the docker ps command*
3. Copy the container id for the coyote-web image. Ex: "d41c8f609c8e"
4. Attach to the container `docker attach d41c8f609c8e`
- Note this will appear blank as if nothing is happening

Now when the binding.pry is hit, you can interact with the terminal as you normally would

### Configuring secure credentials

The app uses [Rails secure credentials](https://edgeguides.rubyonrails.org/security.html#custom-credentials) with sane development-time defaults. This allows us to ship Dockerized versions of the app with zero configuration, for both development and production.
Expand Down

0 comments on commit 36caabf

Please sign in to comment.