Issue with my_first_rails_app when pushed to heroku - "we're sorry, but something went wrong"


Hi everyone, I’m currently plodding through the my_first_rails_app lesson, but have become rather stuck at the first push to Heroku. When I follow the link or click “open app” on Heroku, the message “we’re sorry, but something went wrong” is displayed.

I have followed everything as instructed as far as I can tell, and have double checked all of the changes made to the files to make sure I didn’t mess up something there. So being a newbie I am completely out of my depth trying to solve this one, so any help would be greatly appreciated. Here is the output in terminal from pushing to Heroku (thanks for the help in advance!):

fletch@Fletch-Codebook:~/Code/Odin/odin_on_rails/my_first_rails_app$ git push heroku master
Counting objects: 118, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (103/103), done.
Writing objects: 100% (118/118), 27.18 KiB | 1.81 MiB/s, done.
Total 118 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
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
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.1
remote: -----> Installing dependencies using bundler 1.15.2
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
remote:        Fetching rake 12.3.2
remote:        Installing rake 12.3.2
remote:        Fetching concurrent-ruby 1.1.5
remote:        Fetching minitest 5.11.3
remote:        Fetching thread_safe 0.3.6
remote:        Installing thread_safe 0.3.6
remote:        Installing concurrent-ruby 1.1.5
remote:        Installing minitest 5.11.3
remote:        Fetching builder 3.2.3
remote:        Fetching erubi 1.8.0
remote:        Installing builder 3.2.3
remote:        Installing erubi 1.8.0
remote:        Fetching mini_portile2 2.4.0
remote:        Installing mini_portile2 2.4.0
remote:        Fetching crass 1.0.4
remote:        Installing crass 1.0.4
remote:        Fetching rack 2.0.6
remote:        Installing rack 2.0.6
remote:        Fetching nio4r 2.3.1
remote:        Fetching websocket-extensions 0.1.3
remote:        Installing websocket-extensions 0.1.3
remote:        Installing nio4r 2.3.1 with native extensions
remote:        Fetching mini_mime 1.0.1
remote:        Installing mini_mime 1.0.1
remote:        Fetching arel 9.0.0
remote:        Installing arel 9.0.0
remote:        Fetching mimemagic 0.3.3
remote:        Fetching msgpack 1.2.9
remote:        Installing mimemagic 0.3.3
remote:        Installing msgpack 1.2.9 with native extensions
remote:        Using bundler 1.17.2
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 0.20.3
remote:        Installing thor 0.20.3
remote:        Fetching ffi 1.10.0
remote:        Installing ffi 1.10.0 with native extensions
remote:        Fetching multi_json 1.13.1
remote:        Installing multi_json 1.13.1
remote:        Fetching pg 1.1.4
remote:        Installing pg 1.1.4 with native extensions
remote:        Fetching puma 3.12.0
remote:        Installing puma 3.12.0 with native extensions
remote:        Fetching rb-fsevent 0.10.3
remote:        Installing rb-fsevent 0.10.3
remote:        Fetching tilt 2.0.9
remote:        Installing tilt 2.0.9
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.1
remote:        Installing nokogiri 1.10.1 with native extensions
remote:        Fetching i18n 1.6.0
remote:        Installing i18n 1.6.0
remote:        Fetching websocket-driver 0.7.0
remote:        Installing websocket-driver 0.7.0 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.1.20
remote:        Installing uglifier 4.1.20
remote:        Fetching bootsnap 1.4.1
remote:        Installing bootsnap 1.4.1 with native extensions
remote:        Fetching rb-inotify 0.10.0
remote:        Installing rb-inotify 0.10.0
remote:        Fetching turbolinks 5.2.0
remote:        Installing turbolinks 5.2.0
remote:        Fetching activesupport
remote:        Installing activesupport
remote:        Fetching loofah 2.2.3
remote:        Installing loofah 2.2.3
remote:        Fetching sass-listen 4.0.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:        Installing globalid 0.4.2
remote:        Fetching activemodel
remote:        Fetching jbuilder 2.8.0
remote:        Installing activemodel
remote:        Installing jbuilder 2.8.0
remote:        Fetching rails-html-sanitizer 1.0.4
remote:        Installing rails-html-sanitizer 1.0.4
remote:        Fetching sass 3.7.3
remote:        Fetching activejob
remote:        Installing activejob
remote:        Installing sass 3.7.3
remote:        Fetching actionview
remote:        Fetching activerecord
remote:        Installing actionview
remote:        Installing activerecord
remote:        Fetching actionpack
remote:        Installing actionpack
remote:        Fetching actioncable
remote:        Fetching activestorage
remote:        Fetching actionmailer
remote:        Installing actionmailer
remote:        Installing actioncable
remote:        Installing activestorage
remote:        Fetching railties
remote:        Fetching sprockets-rails 3.2.1
remote:        Installing railties
remote:        Installing sprockets-rails 3.2.1
remote:        Fetching coffee-rails 4.2.2
remote:        Fetching sass-rails 5.0.7
remote:        Fetching rails
remote:        Installing coffee-rails 4.2.2
remote:        Installing rails
remote:        Installing sass-rails 5.0.7
remote:        Bundle complete! 19 Gemfile dependencies, 61 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:        HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
remote:        But that may break your application.
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:        For more info see:
remote:        Post-install message from sass:
remote:        Ruby Sass is deprecated and will be unmaintained as of 26 March 2019.
remote:        * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
remote:          primary implementation:
remote:        * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
remote:          sassc gem:
remote:        * For more details, please refer to the Sass blog:
remote:        Removing bundler (1.15.2)
remote:        Bundle completed (44.37s)
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.14.1-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
remote:        I, [2019-03-17T22:38:25.661921 #1305]  INFO -- : Writing /tmp/build_d4571fa3834639be14130633df083c69/public/assets/application-9622f0fe63bfad91bdeaa3a771e86262263840678fd66849b311b6cfb3f7cc85.js
remote:        I, [2019-03-17T22:38:25.662454 #1305]  INFO -- : Writing /tmp/build_d4571fa3834639be14130633df083c69/public/assets/application-9622f0fe63bfad91bdeaa3a771e86262263840678fd66849b311b6cfb3f7cc85.js.gz
remote:        I, [2019-03-17T22:38:25.709034 #1305]  INFO -- : Writing /tmp/build_d4571fa3834639be14130633df083c69/public/assets/application-35729bfbaf9967f119234595ed222f7ab14859f304ab0acc5451afb387f637fa.css
remote:        I, [2019-03-17T22:38:25.709412 #1305]  INFO -- : Writing /tmp/build_d4571fa3834639be14130633df083c69/public/assets/application-35729bfbaf9967f119234595ed222f7ab14859f304ab0acc5451afb387f637fa.css.gz
remote:        Asset precompilation completed (3.86s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote: -----> Detecting rails configuration
remote: ###### WARNING:
remote:        Detecting rails configuration failed
remote:        set HEROKU_DEBUG_RAILS_RUNNER=1 to debug
remote: ###### WARNING:
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:        For more information please see:
remote: ###### WARNING:
remote:        No Procfile detected, using the default web server.
remote:        We recommend explicitly declaring how to boot your server process via a Procfile.
remote: -----> Discovering process types
remote:        Procfile declares types     -> (none)
remote:        Default types for buildpack -> console, rake, web
remote: -----> Compressing...
remote:        Done: 42M
remote: -----> Launching...
remote:        Released v6
remote: deployed to Heroku
remote: Verifying deploy... done.
 * [new branch]      master -> master


This is the bulk of the heroku logs immediately after this push (minus a chunk with my email plastered all over it - if this is important I’ll copy that any remove the email). There are a bunch of 'Fatal’s in there, one stating ‘relation “cars” does not exist’, prompting me to check the routes.rb file changes, which seem to be exactly as stated in the lesson so I’m not sure what’s going on there.
Thanks again.

2019-03-17T22:38:39.000000+00:00 app[api]: Build succeeded
2019-03-17T22:38:39.261824+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 46460 -e production`
2019-03-17T22:38:44.295705+00:00 heroku[web.1]: State changed from starting to up
2019-03-17T22:39:05.639154+00:00 heroku[router]: at=info method=GET path="/" request_id=4a745e02-7c06-438c-8f2e-0f8ba052d127 fwd="" dyno=web.1 connect=0ms service=76ms status=500 bytes=1827 protocol=https
2019-03-17T22:39:05.818325+00:00 heroku[router]: at=info method=GET path="/favicon.ico" request_id=4ee9a3c7-42f4-454a-b2d7-6910ed783333 fwd="" dyno=web.1 connect=0ms service=1ms status=200 bytes=143 protocol=https
2019-03-17T22:39:05.565656+00:00 app[web.1]: => Booting Puma
2019-03-17T22:39:05.565694+00:00 app[web.1]: => Rails application starting in production
2019-03-17T22:39:05.565696+00:00 app[web.1]: => Run `rails server -h` for more startup options
2019-03-17T22:39:05.565697+00:00 app[web.1]: Puma starting in single mode...
2019-03-17T22:39:05.565699+00:00 app[web.1]: * Version 3.12.0 (ruby 2.6.1-p33), codename: Llamas in Pajamas
2019-03-17T22:39:05.565701+00:00 app[web.1]: * Min threads: 5, max threads: 5
2019-03-17T22:39:05.565702+00:00 app[web.1]: * Environment: production
2019-03-17T22:39:05.565704+00:00 app[web.1]: * Listening on tcp://
2019-03-17T22:39:05.565705+00:00 app[web.1]: Use Ctrl-C to stop
2019-03-17T22:39:05.565713+00:00 app[web.1]: I, [2019-03-17T22:39:05.565526 #4]  INFO -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127] Started GET "/" for at 2019-03-17 22:39:05 +0000
2019-03-17T22:39:05.566544+00:00 app[web.1]: I, [2019-03-17T22:39:05.566460 #4]  INFO -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127] Processing by CarsController#index as HTML
2019-03-17T22:39:05.574700+00:00 app[web.1]: I, [2019-03-17T22:39:05.574610 #4]  INFO -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127]   Rendering cars/index.html.erb within layouts/application
2019-03-17T22:39:05.636278+00:00 app[web.1]: D, [2019-03-17T22:39:05.636165 #4] DEBUG -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127]   Car Load (1.0ms)  SELECT "cars".* FROM "cars"
2019-03-17T22:39:05.636913+00:00 app[web.1]: I, [2019-03-17T22:39:05.636855 #4]  INFO -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127]   Rendered cars/index.html.erb within layouts/application (62.1ms)
2019-03-17T22:39:05.637129+00:00 app[web.1]: I, [2019-03-17T22:39:05.637068 #4]  INFO -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127] Completed 500 Internal Server Error in 70ms (ActiveRecord: 26.7ms)
2019-03-17T22:39:05.637896+00:00 app[web.1]: F, [2019-03-17T22:39:05.637810 #4] FATAL -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127]
2019-03-17T22:39:05.637944+00:00 app[web.1]: F, [2019-03-17T22:39:05.637876 #4] FATAL -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127] ActionView::Template::Error (PG::UndefinedTable: ERROR:  relation "cars" does not exist
2019-03-17T22:39:05.637946+00:00 app[web.1]: LINE 1: SELECT "cars".* FROM "cars"
2019-03-17T22:39:05.637947+00:00 app[web.1]: ^
2019-03-17T22:39:05.637949+00:00 app[web.1]: : SELECT "cars".* FROM "cars"):
2019-03-17T22:39:05.638143+00:00 app[web.1]: F, [2019-03-17T22:39:05.638066 #4] FATAL -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127]     13:   </thead>
2019-03-17T22:39:05.638145+00:00 app[web.1]: [4a745e02-7c06-438c-8f2e-0f8ba052d127]     14:
2019-03-17T22:39:05.638146+00:00 app[web.1]: [4a745e02-7c06-438c-8f2e-0f8ba052d127]     15:   <tbody>
2019-03-17T22:39:05.638150+00:00 app[web.1]: [4a745e02-7c06-438c-8f2e-0f8ba052d127]     16:     <% @cars.each do |car| %>
2019-03-17T22:39:05.638152+00:00 app[web.1]: [4a745e02-7c06-438c-8f2e-0f8ba052d127]     17:       <tr>
2019-03-17T22:39:05.638153+00:00 app[web.1]: [4a745e02-7c06-438c-8f2e-0f8ba052d127]     18:         <td><%= car.make %></td>
2019-03-17T22:39:05.638154+00:00 app[web.1]: [4a745e02-7c06-438c-8f2e-0f8ba052d127]     19:         <td><%= car.model %></td>
2019-03-17T22:39:05.638226+00:00 app[web.1]: F, [2019-03-17T22:39:05.638144 #4] FATAL -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127]
2019-03-17T22:39:05.638311+00:00 app[web.1]: F, [2019-03-17T22:39:05.638246 #4] FATAL -- : [4a745e02-7c06-438c-8f2e-0f8ba052d127] app/views/cars/index.html.erb:16:in `_app_views_cars_index_html_erb__387629650594160564_47001253667700'


If you type heroku logs in the terminal when in the rails directory then hopefully it should give you an idea of the error.


I attempted to make sense of the fatal errors in the logs but everything I looked at seemed right as per the lesson. So, begrudgingly, I took the nuclear option and deleted everything to restart the process again. It has worked this time so I must have missed something, hopefully I will realise what in the future when I have a better understanding of what I am doing!

Thanks for the tip


Hi, I have the same problem. Can you elaborate (e.g. what actions did you take) what do you mean by “deleted everything to restart the process again”?



Hi @yllabazi

If you could type heroku logs into the terminal when in the rails project folder and let me know the result it would be helpful.

You can use something like to dump it all in and then share a link here.