- Go to Rails Console
- z_list = JSON.parse(File.read('zone.json'))
- z_list.each do |zn|
- Zone.create(zn.to_h)
- end
Minh Le - s3722599 https://protected-citadel-87960.herokuapp.com/
#LOGS
- 2020-06-12T21:17:09.115149+00:00 heroku[web.1]: State changed from up to starting
- 2020-06-12T21:17:10.526009+00:00 heroku[web.1]: Stopping all processes with SIGTERM
- 2020-06-12T21:17:10.563887+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
- 2020-06-12T21:17:10.571026+00:00 app[web.1]: === puma shutdown: 2020-06-12 21:17:10 +0000 ===
- 2020-06-12T21:17:10.571035+00:00 app[web.1]: - Goodbye!
- 2020-06-12T21:17:10.571217+00:00 app[web.1]: Exiting
- 2020-06-12T21:17:10.675292+00:00 heroku[web.1]: Process exited with status 143
- 2020-06-12T21:17:11.000000+00:00 app[api]: Build succeeded
- 2020-06-12T21:17:11.568986+00:00 heroku[web.1]: Starting process with command
bin/rails server -p ${PORT:-5000} -e production
- 2020-06-12T21:17:17.329323+00:00 heroku[web.1]: State changed from starting to up
- Run
docker-compose build
after every Gemfile change or to build the containers
- Run
docker-compose up
to run the rails app - hit
http://0.0.0.0:3000
- Add
binding.pry
orbyebug
in your code where you want to put the breakpoint. - Run
docker-compose run --service-port --rm web
in your console to run the rails app in Debug mode - Access the endpoint you are debugging to go into debugging mode in pry or byebug
docker-compose run --rm web rails new . --force --no-deps --database=postgresql
docker-compose run --rm web bundle install
docker-compose run --rm web bundle update
docker-compose run --rm web rails db:create
docker-compose run --rm web rails db:migrate
docker-compose run --rm web rails db:drop
docker-compose run --rm web rails assets:precompile
docker-compose run --rm web rails console
docker-compose run --rm web rails test