Step 3.9: Visit Your New Application


#1

Hello, I am a beginner working on the my_first_rails_app part and keep getting errors when opening the app, typing “heroku open”. it’s open me a webpage with the message : “We’re sorry, but something went wrong.”.
thanks in advance for your help!!

bp-van-merel:my_first_rails_app merelhuijgen$ code .
mbp-van-merel:my_first_rails_app merelhuijgen$ git status
On branch master
Your branch is up to date with ‘origin/master’.

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

modified:   Gemfile
modified:   Gemfile.lock
modified:   config/routes.rb

no changes added to commit (use “git add” and/or “git commit -a”)
mbp-van-merel:my_first_rails_app merelhuijgen$ git add .
mbp-van-merel:my_first_rails_app merelhuijgen$ git commit -m ‘updates for heroku deployment’
[master f19c38b] updates for heroku deployment
3 files changed, 11 insertions(+), 3 deletions(-)
mbp-van-merel:my_first_rails_app merelhuijgen$ git push origin master
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 631 bytes | 631.00 KiB/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To github.com:deHuijg/my_first_rails_app.git
765fa34…f19c38b master -> master
mbp-van-merel:my_first_rails_app merelhuijgen$ git push heroku master
Enumerating objects: 118, done.
Counting objects: 100% (118/118), done.
Delta compression using up to 4 threads
Compressing objects: 100% (103/103), done.
Writing objects: 100% (118/118), 27.13 KiB | 1.23 MiB/s, done.
Total 118 (delta 6), reused 0 (delta 0)
remote: Compressing source files… done.
remote: Building source:
remote:
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.5
remote: -----> Vendoring libpq 5.12.1
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Installing dependencies using bundler 1.17.3
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java.
remote: Fetching gem metadata from https://rubygems.org/
remote: Fetching rake 13.0.1
remote: Installing rake 13.0.1
remote: Fetching concurrent-ruby 1.1.5
remote: Fetching thread_safe 0.3.6
remote: Fetching minitest 5.13.0
remote: Installing thread_safe 0.3.6
remote: Installing minitest 5.13.0
remote: Installing concurrent-ruby 1.1.5
remote: Fetching builder 3.2.4
remote: Installing builder 3.2.4
remote: Fetching erubi 1.9.0
remote: Installing erubi 1.9.0
remote: Fetching mini_portile2 2.4.0
remote: Fetching crass 1.0.5
remote: Installing crass 1.0.5
remote: Installing mini_portile2 2.4.0
remote: Fetching rack 2.0.8
remote: Installing rack 2.0.8
remote: Fetching nio4r 2.5.2
remote: Fetching websocket-extensions 0.1.4
remote: Installing nio4r 2.5.2 with native extensions
remote: Installing websocket-extensions 0.1.4
remote: Fetching mini_mime 1.0.2
remote: Installing mini_mime 1.0.2
remote: Fetching arel 9.0.0
remote: Installing arel 9.0.0
remote: Fetching mimemagic 0.3.3
remote: Fetching msgpack 1.3.1
remote: Installing msgpack 1.3.1 with native extensions
remote: Installing mimemagic 0.3.3
remote: Using bundler 1.17.3
remote: Fetching coffee-script-source 1.12.2
remote: Installing coffee-script-source 1.12.2
remote: Fetching execjs 2.7.0
remote: Installing execjs 2.7.0
remote: Fetching method_source 0.9.2
remote: Installing method_source 0.9.2
remote: Fetching thor 1.0.1
remote: Installing thor 1.0.1
remote: Fetching ffi 1.11.3
remote: Installing ffi 1.11.3 with native extensions
remote: Fetching pg 1.2.0
remote: Installing pg 1.2.0 with native extensions
remote: Fetching puma 3.12.2
remote: Installing puma 3.12.2 with native extensions
remote: Fetching rb-fsevent 0.10.3
remote: Installing rb-fsevent 0.10.3
remote: Fetching tilt 2.0.10
remote: Installing tilt 2.0.10
remote: Fetching turbolinks-source 5.2.0
remote: Installing turbolinks-source 5.2.0
remote: Fetching tzinfo 1.2.5
remote: Installing tzinfo 1.2.5
remote: Fetching nokogiri 1.10.7
remote: Installing nokogiri 1.10.7 with native extensions
remote: Fetching i18n 1.7.0
remote: Installing i18n 1.7.0
remote: Fetching websocket-driver 0.7.1
remote: Installing websocket-driver 0.7.1 with native extensions
remote: Fetching mail 2.7.1
remote: Installing mail 2.7.1
remote: Fetching rack-test 1.1.0
remote: Installing rack-test 1.1.0
remote: Fetching sprockets 3.7.2
remote: Installing sprockets 3.7.2
remote: Fetching marcel 0.3.3
remote: Installing marcel 0.3.3
remote: Fetching coffee-script 2.4.1
remote: Installing coffee-script 2.4.1
remote: Fetching uglifier 4.2.0
remote: Installing uglifier 4.2.0
remote: Fetching bootsnap 1.4.5
remote: Installing bootsnap 1.4.5 with native extensions
remote: Fetching rb-inotify 0.10.0
remote: Installing rb-inotify 0.10.0
remote: Fetching turbolinks 5.2.1
remote: Installing turbolinks 5.2.1
remote: Fetching activesupport 5.2.4.1
remote: Installing activesupport 5.2.4.1
remote: Fetching loofah 2.4.0
remote: Installing loofah 2.4.0
remote: Fetching rails-html-sanitizer 1.3.0
remote: Fetching sass-listen 4.0.0
remote: Installing rails-html-sanitizer 1.3.0
remote: Installing sass-listen 4.0.0
remote: Fetching rails-dom-testing 2.0.3
remote: Installing rails-dom-testing 2.0.3
remote: Fetching globalid 0.4.2
remote: Fetching activemodel 5.2.4.1
remote: Installing globalid 0.4.2
remote: Installing activemodel 5.2.4.1
remote: Fetching jbuilder 2.9.1
remote: Installing jbuilder 2.9.1
remote: Fetching sass 3.7.4
remote: Fetching actionview 5.2.4.1
remote: Installing sass 3.7.4
remote: Installing actionview 5.2.4.1
remote: Fetching activejob 5.2.4.1
remote: Installing activejob 5.2.4.1
remote: Fetching activerecord 5.2.4.1
remote: Installing activerecord 5.2.4.1
remote: Fetching actionpack 5.2.4.1
remote: Installing actionpack 5.2.4.1
remote: Fetching actioncable 5.2.4.1
remote: Fetching activestorage 5.2.4.1
remote: Fetching actionmailer 5.2.4.1
remote: Installing actioncable 5.2.4.1
remote: Installing actionmailer 5.2.4.1
remote: Installing activestorage 5.2.4.1
remote: Fetching railties 5.2.4.1
remote: Installing railties 5.2.4.1
remote: Fetching sprockets-rails 3.2.1
remote: Installing sprockets-rails 3.2.1
remote: Fetching coffee-rails 4.2.2
remote: Fetching sass-rails 5.1.0
remote: Fetching rails 5.2.4.1
remote: Installing coffee-rails 4.2.2
remote: Installing sass-rails 5.1.0
remote: Installing rails 5.2.4.1
remote: Bundle complete! 19 Gemfile dependencies, 60 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle
remote: Post-install message from i18n:
remote:
remote: HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
remote: But that may break your application.
remote:
remote: Please check your Rails app for ‘config.i18n.fallbacks = true’.
remote: If you’re using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
remote: ‘config.i18n.fallbacks = [I18n.default_locale]’.
remote: If not, fallbacks will be broken in your app by I18n 1.1.x.
remote:
remote: For more info see:
remote: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
remote:
remote: Post-install message from sass:
remote:
remote: Ruby Sass has reached end-of-life and should no longer be used.
remote:
remote: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
remote: primary implementation: https://sass-lang.com/instal
remote:
remote: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
remote: sassc gem: https://github.com/sass/sassc-ruby#readme
remote:
remote: * For more details, please refer to the Sass blog:
remote: https://sass-lang.com/blog/posts/7828841
remote:
remote: Bundle completed (44.36s)
remote: Cleaning up the bundler cache.
remote: The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java.
remote: -----> Installing node-v10.15.3-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Yarn executable was not detected in the system.
remote: Download Yarn at https://yarnpkg.com/en/docs/install
remote: I, [2020-01-02T11:33:25.295080 #1374] INFO – : Writing /tmp/build_da8ccb438bea790c59e44f5252dcbcdc/public/assets/application-6123cad289a84e0cc1aa95fdfffef1cbed403e231776fa14f7407c66d504e3c8.js
remote: I, [2020-01-02T11:33:25.295433 #1374] INFO – : Writing /tmp/build_da8ccb438bea790c59e44f5252dcbcdc/public/assets/application-6123cad289a84e0cc1aa95fdfffef1cbed403e231776fa14f7407c66d504e3c8.js.gz
remote: I, [2020-01-02T11:33:25.350376 #1374] INFO – : Writing /tmp/build_da8ccb438bea790c59e44f5252dcbcdc/public/assets/application-35729bfbaf9967f119234595ed222f7ab14859f304ab0acc5451afb387f637fa.cs
remote: I, [2020-01-02T11:33:25.351012 #1374] INFO – : Writing /tmp/build_da8ccb438bea790c59e44f5252dcbcdc/public/assets/application-35729bfbaf9967f119234595ed222f7ab14859f304ab0acc5451afb387f637fa.css.gz
remote: Asset precompilation completed (3.82s)
remote: Cleaning assets
remote: Running: rake assets:clean
remote: -----> Detecting rails configuration
remote:
remote: ###### WARNING:
remote:
remote: Replacing libpq with version libpq 5.12.1
remote:
remote: This version includes a bug fix that can cause an exception
remote: on boot for applications with incorrectly configured connection
remote: values. For more information see:
remote:
remote: https://devcenter.heroku.com/articles/libpq-5-12-1-breaking-connection-behavior
remote:
remote: If your application breaks you can rollback to your last build.
remote: You can also temporarially opt out of this behavior by setting:
remote:
remote: remote: $ heroku config:set HEROKU_SKIP_LIBPQ12=1 remote:
remote:
remote: In the future libpq 5.12 will be the default on the platform and
remote: you will not be able to opt-out of the library. For more information see:
remote:
remote: https://devcenter.heroku.com/articles/libpq-5-12-1-breaking-connection-behavior
remote:
remote:
remote: ###### WARNING:
remote:
remote: Detecting rails configuration failed
remote: set HEROKU_DEBUG_RAILS_RUNNER=1 to debug
remote:
remote:
remote: ###### WARNING:
remote:
remote: We detected that some binary dependencies required to
remote: use all the preview features of Active Storage are not
remote: present on this system.
remote:
remote: For more information please see:
remote: https://devcenter.heroku.com/articles/active-storage-on-heroku
remote:
remote:
remote:
remote: ###### WARNING:
remote:
remote: No Procfile detected, using the default web server.
remote: We recommend explicitly declaring how to boot your server process via a Procfile.
remote: https://devcenter.heroku.com/articles/ruby-default-web-server
remote:
remote:
remote:
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> console, rake, web
remote:
remote: -----> Compressing…
remote: Done: 42.5M
remote: -----> Launching…
remote: Released v6
remote: https://guarded-island-23649.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy… done.
To https://git.heroku.com/guarded-island-23649.git

  • [new branch] master -> master
    mbp-van-merel:my_first_rails_app merelhuijgen$ heroku buildpacks:set https://github.com/bundler/heroku-buildpack-bundler2
    Buildpack set. Next release on guarded-island-23649 will use https://github.com/bundler/heroku-buildpack-bundler2.
    Run git push heroku master to create a new release using this buildpack.
    mbp-van-merel:my_first_rails_app merelhuijgen$ git push heroku master
    Everything up-to-date
    mbp-van-merel:my_first_rails_app merelhuijgen$ heroku run rails db:migrate
    Running rails db:migrate on ⬢ guarded-island-23649… up, run.6822 (Free)
    D, [2020-01-02T11:42:54.186293 #4] DEBUG – : (13.5ms) CREATE TABLE “schema_migrations” (“version” character varying NOT NULL PRIMARY KEY)
    D, [2020-01-02T11:42:54.196629 #4] DEBUG – : (7.6ms) CREATE TABLE “ar_internal_metadata” (“key” character varying NOT NULL PRIMARY KEY, “value” character varying, “created_at” timestamp NOT NULL, “updated_at” timestamp NOT NULL)
    D, [2020-01-02T11:42:54.199110 #4] DEBUG – : (1.1ms) SELECT pg_try_advisory_lock(28335891914794065)
    D, [2020-01-02T11:42:54.213961 #4] DEBUG – : (1.6ms) SELECT “schema_migrations”.“version” FROM “schema_migrations” ORDER BY “schema_migrations”.“version” ASC
    I, [2020-01-02T11:42:54.215219 #4] INFO – : Migrating to CreateCars (20191222203134)
    D, [2020-01-02T11:42:54.218572 #4] DEBUG – : (1.2ms) BEGIN
    == 20191222203134 CreateCars: migrating =======================================
    – create_table(:cars)
    D, [2020-01-02T11:42:54.230188 #4] DEBUG – : (10.9ms) CREATE TABLE “cars” (“id” bigserial primary key, “make” character varying, “model” character varying, “year” integer, “created_at” timestamp NOT NULL, “updated_at” timestamp NOT NULL)
    -> 0.0117s
    == 20191222203134 CreateCars: migrated (0.0118s) ==============================

D, [2020-01-02T11:42:54.236580 #4] DEBUG – : ActiveRecord::SchemaMigration Create (1.4ms) INSERT INTO “schema_migrations” (“version”) VALUES ($1) RETURNING “version” [[“version”, “20191222203134”]]
D, [2020-01-02T11:42:54.239595 #4] DEBUG – : (2.7ms) COMMIT
D, [2020-01-02T11:42:54.250277 #4] DEBUG – : ActiveRecord::InternalMetadata Load (1.2ms) SELECT “ar_internal_metadata”.* FROM “ar_internal_metadata” WHERE “ar_internal_metadata”.“key” = $1 LIMIT $2 [[“key”, “environment”], [“LIMIT”, 1]]
D, [2020-01-02T11:42:54.258052 #4] DEBUG – : (1.1ms) BEGIN
D, [2020-01-02T11:42:54.260355 #4] DEBUG – : ActiveRecord::InternalMetadata Create (1.4ms) INSERT INTO “ar_internal_metadata” (“key”, “value”, “created_at”, “updated_at”) VALUES ($1, $2, $3, $4) RETURNING “key” [[“key”, “environment”], [“value”, “production”], [“created_at”, “2020-01-02 11:42:54.258310”], [“updated_at”, “2020-01-02 11:42:54.258310”]]
D, [2020-01-02T11:42:54.262711 #4] DEBUG – : (1.7ms) COMMIT
D, [2020-01-02T11:42:54.264195 #4] DEBUG – : (1.1ms) SELECT pg_advisory_unlock(28335891914794065)
mbp-van-merel:my_first_rails_app merelhuijgen$ heroku open
mbp-van-merel:my_first_rails_app merelhuijgen$ heroku open
mbp-van-merel:my_first_rails_app merelhuijgen$


#2

Execute: heroku run rails db:migrate
Then redeploy your app!


#3

Thank you Eduardo06sp. I think im still doing something wrong tho…
Hope you can help me :slight_smile:

Thanks in advance

mbp-van-merel:my_first_rails_app merelhuijgen$ heroku run rails db:migrate
Running rails db:migrate on ⬢ guarded-island-23649… up, run.9427 (Free)
D, [2020-01-08T13:08:48.602777 #4] DEBUG – : (1.2ms) SELECT pg_try_advisory_lock(28335891914794065)
D, [2020-01-08T13:08:48.627825 #4] DEBUG – : (1.8ms) SELECT “schema_migrations”.“version” FROM “schema_migrations” ORDER BY “schema_migrations”.“version” ASC
D, [2020-01-08T13:08:48.637574 #4] DEBUG – : ActiveRecord::InternalMetadata Load (1.3ms) SELECT “ar_internal_metadata”.* FROM “ar_internal_metadata” WHERE “ar_internal_metadata”.“key” = $1 LIMIT $2 [[“key”, “environment”], [“LIMIT”, 1]]
D, [2020-01-08T13:08:48.654553 #4] DEBUG – : (8.1ms) BEGIN
D, [2020-01-08T13:08:48.656571 #4] DEBUG – : (1.1ms) COMMIT
D, [2020-01-08T13:08:48.658683 #4] DEBUG – : (1.9ms) SELECT pg_advisory_unlock(28335891914794065)
mbp-van-merel:my_first_rails_app merelhuijgen$ heroku open
mbp-van-merel:my_first_rails_app merelhuijgen$


#4

Try typing heroku logs in the terminal when in the rails project folder. Can you spot an error message?