Error When Deploying App to Heroku: Railsbridge Installfest—Deploy a Rails App
<p>I'm performing the <a href="http://installfest.railsbridge.org/installfest/deploy_a_rails_app" rel="nofollow">railsbridge installfest</a> (as part of the Odin project), and I've run into problems in the final stage: "Deploy A Rails App." I get a lot of unexpected results from the terminal, and when I navigate to the heroku app's web address at the end of the tutorial, I get:</p>

<p><em>"The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
If you are the application owner check the logs for more information."</em></p>

<p>I'm running Ubuntu 16.04 LTS as a VM on Windows 10. I've tried deleting the test_app created during the tutorial (both online and off) and starting again, and I've tried powering the VM off and on before starting again, but no luck. I've also had a look for people with similar issues on this site, but can't find any equivalent error messages. </p>

<p>Prior to these problems, the tutorial had me create a rails server, which functioned exactly as I was told it should. The problems only started when I tried to deploy the app to heroku.</p>

<p>I've included all the stages I went through.  Where the expected command line result (as specified in the tutorial) differed from my actual result, I've included both, flagged as discrepancies. I haven't included command line results which were as expected—this question is already long enough without me adding all that! If you need that info to help me, I've saved it, so just let me know.</p>

<p>Apologies if I've missed something obvious—I am <em>completely</em> new to coding. </p>

<p>I executed (in terminal):</p>

<pre><code>git init
git add -A
git commit -m "initial commit"
git log
heroku create
</code></pre>

<p><strong><em>1st Discrepancy:</em></strong></p>

<p>Expected code:</p>

<pre><code>Enter your Heroku credentials.
Email: myemail@example.com
Password:
Uploading ssh public key /Users/smei/.ssh/id_rsa.pub
Creating floating-winter-18... done, stack is cedar
http://floating-winter-18.heroku.com/ | git@heroku.com:floating-winter-18.git
Git remote heroku added
</code></pre>

<p>Actual Code:</p>

<pre><code>Creating app... done, ⬢ tranquil-beyond-97147
https://tranquil-beyond-97147.herokuapp.com/ | https://git.heroku.com/tranquil-beyond-97147.git
</code></pre>

<p>Then I changed a line in ~/railsbridge/test_app/Gemfile from</p>

<pre><code>gem 'sqlite3'
</code></pre>

<p>to</p>

<pre><code>group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end
</code></pre>

<p>Then (in terminal again) I executed:</p>

<pre><code>gem install bundler
bundle install --without production
</code></pre>

<p>Then I added a line in ~/railsbridge/test_app/config/routes.rb under the line Rails.application.routes.draw do:</p>

<p>Line added:</p>

<pre><code>root 'drinks#index'
</code></pre>

<p>Then (back in terminal) I executed:</p>

<pre><code>git add .
git commit -m "Updates for heroku deployment"
git push heroku master
</code></pre>

<p><strong><em>2nd Discrepancy:</em></strong></p>

<p>Expected Code:</p>

<pre><code>The authenticity of host 'heroku.com (75.101.145.87)' can't be established.
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,75.101.145.87' (RSA) to the list of known hosts.
Counting objects: 60, done.
Compressing objects: 100% (54/54), done.
Writing objects: 100% (60/60), 79.03 KiB, done.
Total 60 (delta 10), reused 0 (delta 0)

-----&gt; Heroku receiving push
-----&gt; Rails app detected
       Compiled slug size is 080K
-----&gt; Launching...... done
       App deployed to Heroku

To git@heroku.com:floating-winter-18.git
 * [new branch]      master -&gt; master
</code></pre>

<p>Actual Code:</p>

<pre><code>Counting objects: 114, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (100/100), done.
Writing objects: 100% (114/114), 25.05 KiB | 0 bytes/s, done.
Total 114 (delta 7), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----&gt; Ruby app detected
remote: -----&gt; Compiling Ruby/Rails
remote: -----&gt; Using Ruby version: ruby-2.2.4
remote: -----&gt; Installing dependencies using bundler 1.11.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        Fetching gem metadata from https://rubygems.org/..........
remote:        Fetching version metadata from https://rubygems.org/...
remote:        Fetching dependency metadata from https://rubygems.org/..
remote:        Installing i18n 0.7.0
remote:        Installing concurrent-ruby 1.0.2
remote:        Installing rake 11.3.0
remote:        Installing minitest 5.9.1
remote:        Installing builder 3.2.2
remote:        Installing thread_safe 0.3.5
remote:        Installing mini_portile2 2.1.0
remote:        Installing erubis 2.7.0
remote:        Installing rack 2.0.1
remote:        Installing nio4r 1.2.1 with native extensions
remote:        Installing websocket-extensions 0.1.2
remote:        Installing mime-types-data 3.2016.0521
remote:        Installing arel 7.1.4
remote:        Installing coffee-script-source 1.10.0
remote:        Installing execjs 2.7.0
remote:        Installing thor 0.19.1
remote:        Installing multi_json 1.12.1
remote:        Installing pg 0.19.0 with native extensions
remote:        Installing method_source 0.8.2
remote:        Installing puma 3.6.0 with native extensions
remote:        Using bundler 1.11.2
remote:        Installing sass 3.4.22
remote:        Installing tilt 2.0.5
remote:        Installing turbolinks-source 5.0.0
remote:        Installing nokogiri 1.6.8.1 with native extensions
remote:        Installing tzinfo 1.2.2
remote:        Installing websocket-driver 0.6.4 with native extensions
remote:        Installing rack-test 0.6.3
remote:        Installing sprockets 3.7.0
remote:        Installing mime-types 3.1
remote:        Installing coffee-script 2.4.1
remote:        Installing uglifier 3.0.2
remote:        Installing turbolinks 5.0.1
remote:        Installing activesupport 5.0.0.1
remote:        Installing mail 2.6.4
remote:        Installing globalid 0.3.7
remote:        Installing activemodel 5.0.0.1
remote:        Installing jbuilder 2.6.0
remote:        Installing activejob 5.0.0.1
remote:        Installing activerecord 5.0.0.1
remote:        Installing loofah 2.0.3
remote:        Installing rails-html-sanitizer 1.0.3
remote:        Installing rails-dom-testing 2.0.1
remote:        Installing actionview 5.0.0.1
remote:        Installing actionpack 5.0.0.1
remote:        Installing actionmailer 5.0.0.1
remote:        Installing actioncable 5.0.0.1
remote:        Installing railties 5.0.0.1
remote:        Installing sprockets-rails 3.2.0
remote:        Installing coffee-rails 4.2.1
remote:        Installing rails 5.0.0.1
remote:        Installing jquery-rails 4.2.1
remote:        Installing sass-rails 5.0.6
remote:        Bundle complete! 16 Gemfile dependencies, 53 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Bundle completed (25.91s)
remote:        Cleaning up the bundler cache.
remote: -----&gt; Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        I, [2016-10-16T22:14:51.182054 #1022]  INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-ea005870b2299ed0464e134ab4079aa8856885e9ffd3d81e60417322f2fa0a97.js
remote:        I, [2016-10-16T22:14:51.202261 #1022]  INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-ea005870b2299ed0464e134ab4079aa8856885e9ffd3d81e60417322f2fa0a97.js.gz
remote:        I, [2016-10-16T22:14:51.252933 #1022]  INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-d12397cbc3a266ce5a99f7b588223090c55ca04a439953bb5f9304395de93fc3.css
remote:        I, [2016-10-16T22:14:51.253116 #1022]  INFO -- : Writing /tmp/build_eaa9178115288d749f254409ffd66e9f/public/assets/application-d12397cbc3a266ce5a99f7b588223090c55ca04a439953bb5f9304395de93fc3.css.gz
remote:        Asset precompilation completed (3.83s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote: 
remote: ###### WARNING:
remote:        You have not declared a Ruby version in your Gemfile.
remote:        To set your Ruby version add this line to your Gemfile:
remote:        ruby '2.2.4'
remote:        # See https://devcenter.heroku.com/articles/ruby-versions for more information.
remote: 
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:        https://devcenter.heroku.com/articles/ruby-default-web-server
remote: 
remote: -----&gt; Discovering process types
remote:        Procfile declares types     -&gt; (none)
remote:        Default types for buildpack -&gt; console, rake, web, worker
remote: 
remote: -----&gt; Compressing...
remote:        Done: 27.9M
remote: -----&gt; Launching...
remote:        Released v5
remote:        https://tranquil-beyond-97147.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/tranquil-beyond-97147.git
 * [new branch]      master -&gt; master
</code></pre>

<p>And finally, I entered </p>

<pre><code>heroku run rake db:migrate
</code></pre>

<p><strong><em>3rd Discrepancy:</em></strong></p>

<p>Expected Code:</p>

<pre><code>Migrating to CreateDrinks (20160706063236)
==  20160706063236 CreateDrinks: migrating =====================================
-- create_table(:drinks)
   -&gt; 0.0084s
==  20160706063236 CreateDrinks: migrated (0.0085s) ============================
</code></pre>

<p>Actual Code:</p>

<pre><code>Running rake db:migrate on ⬢ tranquil-beyond-97147... up, run.1313 (Free)
D, [2016-10-16T22:16:19.568857 #3] DEBUG -- :    (12.1ms)  CREATE TABLE "schema_migrations" ("version" character varying PRIMARY KEY)
D, [2016-10-16T22:16:19.582446 #3] DEBUG -- :    (7.5ms)  CREATE TABLE "ar_internal_metadata" ("key" character varying PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
D, [2016-10-16T22:16:19.586398 #3] DEBUG -- :    (1.8ms)  SELECT pg_try_advisory_lock(4170385879066863015);
D, [2016-10-16T22:16:19.598567 #3] DEBUG -- :   ActiveRecord::SchemaMigration Load (1.9ms)  SELECT "schema_migrations".* FROM "schema_migrations"
I, [2016-10-16T22:16:19.604863 #3]  INFO -- : Migrating to CreateDrinks (20161016221052)
D, [2016-10-16T22:16:19.607807 #3] DEBUG -- :    (1.8ms)  BEGIN
== 20161016221052 CreateDrinks: migrating =====================================
-- create_table(:drinks)
D, [2016-10-16T22:16:19.615754 #3] DEBUG -- :    (7.0ms)  CREATE TABLE "drinks" ("id" serial primary key, "name" character varying, "temperature" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
   -&gt; 0.0078s
== 20161016221052 CreateDrinks: migrated (0.0079s) ============================

D, [2016-10-16T22:16:19.623202 #3] DEBUG -- :   SQL (1.9ms)  INSERT INTO "schema_migrations" ("version") VALUES ($1) RETURNING "version"  [["version", "20161016221052"]]
D, [2016-10-16T22:16:19.627228 #3] DEBUG -- :    (3.8ms)  COMMIT
D, [2016-10-16T22:16:19.637096 #3] DEBUG -- :   ActiveRecord::InternalMetadata Load (1.8ms)  SELECT  "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2  [["key", :environment], ["LIMIT", 1]]
D, [2016-10-16T22:16:19.644393 #3] DEBUG -- :    (1.6ms)  BEGIN
D, [2016-10-16T22:16:19.647314 #3] DEBUG -- :   SQL (1.9ms)  INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"  [["key", "environment"], ["value", "production"], ["created_at", 2016-10-16 22:16:19 UTC], ["updated_at", 2016-10-16 22:16:19 UTC]]
D, [2016-10-16T22:16:19.649903 #3] DEBUG -- :    (2.4ms)  COMMIT
D, [2016-10-16T22:16:19.651778 #3] DEBUG -- :    (1.7ms)  SELECT pg_advisory_unlock(4170385879066863015)
</code></pre>

<p>I hope I've made this as clear as possible, and thanks so much in advance for any help you can provide.</p>