Rails Heroku App Won't Load - ruby-on-rails

My Rails App deployed on Heroku won't load. I setup the DB + migrate and I also have puma and procfile... I literally have no clue.
Here's my logs:
2016-06-27T02:12:40.565429+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 8592 -e production`
2016-06-27T02:12:43.410912+00:00 app[web.1]: => Ctrl-C to shutdown server
2016-06-27T02:12:43.410821+00:00 app[web.1]: => Booting Puma
2016-06-27T02:12:43.410885+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://127.0.0.1:8592
2016-06-27T02:12:43.410896+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-06-27T02:12:44.269805+00:00 app[web.1]: [3] * Version 3.4.0 (ruby 2.2.4-p230), codename: Owl Bowl Brawl
2016-06-27T02:12:44.270470+00:00 app[web.1]: [3] Use Ctrl-C to stop
2016-06-27T02:12:44.269782+00:00 app[web.1]: [3] Puma starting in cluster mode...
2016-06-27T02:12:44.269807+00:00 app[web.1]: [3] * Environment: production
2016-06-27T02:12:44.269855+00:00 app[web.1]: [3] * Preloading application
2016-06-27T02:12:44.269806+00:00 app[web.1]: [3] * Min threads: 5, max threads: 5
2016-06-27T02:12:44.269840+00:00 app[web.1]: [3] * Process workers: 2
2016-06-27T02:12:44.270026+00:00 app[web.1]: [3] * Listening on tcp://127.0.0.1:8592
2016-06-27T02:12:44.276018+00:00 app[web.1]: [3] - Worker 1 (pid: 9) booted, phase: 0
2016-06-27T02:12:44.275358+00:00 app[web.1]: [3] - Worker 0 (pid: 5) booted, phase: 0
2016-06-27T02:13:12.887521+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=salty-sierra-72006.herokuapp.com request_id=e96197b0-0946-4b58-a68c-b8a9a3c3fc15 fwd="184.160.104.208" dyno= connect= service= status=503 bytes=
2016-06-27T02:13:41.028910+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-06-27T02:13:41.028910+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-06-27T02:13:41.783167+00:00 heroku[web.1]: State changed from starting to crashed
2016-06-27T02:13:41.772079+00:00 heroku[web.1]: Process exited with status 137
2016-06-27T02:13:42.941344+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=salty-sierra-72006.herokuapp.com request_id=0411e6f6-3dee-4d15-9bf2-8e069a20d9fb fwd="184.160.104.208" dyno= connect= service= status=503 bytes=
2016-06-27T02:13:43.295246+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=salty-sierra-72006.herokuapp.com request_id=e1d9e2cd-086a-4d65-9100-dc4c407c9835 fwd="184.160.104.208" dyno= connect= service= status=503 bytes=
Gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.6'
gem 'pg'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'rake', '< 11'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'rails_12factor'
gem 'bootstrap-sass', '~> 3.3.6'
gem 'sass-rails', '>= 3.2'
gem 'simple_form'
gem 'twilio-ruby', '~> 4.11.1'
gem 'dotenv-rails'
gem 'puma'
gem "font-awesome-rails"
group :development, :test do
gem 'rspec-rails', '~> 3.1.0'
gem "factory_girl_rails", "~> 4.7.0"
gem "faker"
gem "shoulda-matchers", "~> 3.1.1"
gem "database_cleaner", "~> 1.4.0"
gem "rails_best_practices", "~> 1.16.0"
gem "rails-erd"
gem 'annotate'
gem 'pry-byebug'
gem 'awesome_print'
gem 'pry-stack_explorer'
gem 'pry-coolline'
gem 'pry-doc'
gem 'pry-rails'
gem 'pry'
gem 'pry-macro'
gem 'pry-state'
end
group :development do
gem 'better_errors'
gem "binding_of_caller"
gem 'spring'
end
Procfile
web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}
config/puma.rb
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end

I found the issue and it is quite simple.
1- heroku pg:reset DATABASE_URL
2- https://devcenter.heroku.com/articles/heroku-postgresql
3- Launch Heroku from your local, not your virtual box.
Working.

Related

Getting AWS S3 to work with heroku when deploying rails app

I am REALLY having a hard time getting amazon web services S3 storage to be my active record storage solution instead of local in production after deploying to heroku. I get internal server errors in the heroku logs which don't help at all.
my storage.yml
test:
service: Disk
root: <%= Rails.root.join("tmp/storage") %>
local:
service: Disk
root: <%= Rails.root.join("storage") %>
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
# amazon:
amazon:
service: S3
access_key_id: "won't show you"
secret_access_key: "won't show"
region: "us-east-2"
bucket: "novay-technologies"
production.rb
config.active_storage.service = :amazon
Made a procfile also since I need to use Puma for a web server in production on Heroku. Don't know if I did that right. From what I understand it's a plain text file with no file extensions like .txt and it's supposed to be in the root directory of your app.
web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-production}
Gemfile:
gem "aws-sdk-s3", require: false
Anything I'm doing wrong? I also configured the variables on the heroku app for the aws_secret credentials, the bucket name, etc.
Heroku Log:
$ heroku logs --tail
2018-09-14T05:33:47.732692+00:00 app[web.1]: I, [2018-09-14T05:33:47.732579 #12] INFO -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] Processing by HomeBlogsController#index as HTML
2018-09-14T05:33:47.756797+00:00 app[web.1]: I, [2018-09-14T05:33:47.756647 #12] INFO -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] Rendering home_blogs/index.html.erb within layouts/application
2018-09-14T05:33:47.770155+00:00 app[web.1]: I, [2018-09-14T05:33:47.770028 #12] INFO -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] Rendered home_blogs/_team_slider.html.erb (2.0ms)
2018-09-14T05:33:47.771796+00:00 app[web.1]: I, [2018-09-14T05:33:47.771700 #12] INFO -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] Rendered home_blogs/index.html.erb within layouts/application (14.8ms)
2018-09-14T05:33:47.772226+00:00 app[web.1]: I, [2018-09-14T05:33:47.772143 #12] INFO -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] Completed 500 Internal Server Error in 39ms
2018-09-14T05:33:47.773372+00:00 app[web.1]: F, [2018-09-14T05:33:47.773284 #12] FATAL -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d]
2018-09-14T05:33:47.773494+00:00 app[web.1]: F, [2018-09-14T05:33:47.773397 #12] FATAL -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] ActionView::Template::Error (The asset "DanielProfile.jpeg" is not present in the asset pipeline.):
2018-09-14T05:33:47.773954+00:00 app[web.1]: F, [2018-09-14T05:33:47.773873 #12] FATAL -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] 4: <div id="team-slider">
2018-09-14T05:33:47.773957+00:00 app[web.1]: [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] 5:
2018-09-14T05:33:47.773959+00:00 app[web.1]: [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] 6: <div class="person active" id="person1">
2018-09-14T05:33:47.773960+00:00 app[web.1]: [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] 7: <%= image_tag "DanielProfile.jpeg", :id=>"daniel-pic"%>
2018-09-14T05:33:47.773962+00:00 app[web.1]: [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] 8: <figcaption><b>Daniel</b></figcaption><p id="bio-text">Info 1</p><br />
2018-09-14T05:33:47.773964+00:00 app[web.1]: [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] 9: </div>
2018-09-14T05:33:47.773966+00:00 app[web.1]: [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] 10: <div class="person" id="person2">
2018-09-14T05:33:47.773987+00:00 app[web.1]: F, [2018-09-14T05:33:47.773932 #12] FATAL -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d]
2018-09-14T05:33:47.774080+00:00 app[web.1]: F, [2018-09-14T05:33:47.774022 #12] FATAL -- : [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] app/views/home_blogs/_team_slider.html.erb:7:in `_app_views_home_blogs__team_slider_html_erb__3603015324260213397_47229290931480'
2018-09-14T05:33:47.774083+00:00 app[web.1]: [ff92f910-5fc0-4fcf-895f-d1b3b78b8f2d] app/views/home_blogs/index.html.erb:48:in `_app_views_home_blogs_index_html_erb___3304137320579381618_47229290790300'
2018-09-14T05:33:48.937228+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=boiling-chamber-89366.herokuapp.com request_id=5801439c-e276-4837-b2d3-9a071b985f88 fwd="107.77.210.166" dyno=web.1 connect=1ms service=13ms status=304 bytes=48 protocol=https
2018-09-14T05:42:45.000000+00:00 app[api]: Build started by user davidmichaelberko#gmail.com
2018-09-14T05:43:36.124158+00:00 heroku[web.1]: Restarting
2018-09-14T05:43:36.125133+00:00 heroku[web.1]: State changed from up to starting
2018-09-14T05:43:37.184709+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-09-14T05:43:37.215584+00:00 app[web.1]: [4] - Gracefully shutting down workers...
2018-09-14T05:43:37.667388+00:00 heroku[web.1]: Process exited with status 143
2018-09-14T05:43:35.147502+00:00 app[api]: Deploy b0e39bae by user davidmichaelberko#gmail.com
2018-09-14T05:43:35.147502+00:00 app[api]: Release v30 created by user davidmichaelberko#gmail.com
2018-09-14T05:43:44.000000+00:00 app[api]: Build succeeded
2018-09-14T05:43:48.420966+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2018-09-14T05:43:52.242466+00:00 app[web.1]: [4] Puma starting in cluster mode...
2018-09-14T05:43:52.242489+00:00 app[web.1]: [4] * Version 3.12.0 (ruby 2.3.5-p376), codename: Llamas in Pajamas
2018-09-14T05:43:52.242491+00:00 app[web.1]: [4] * Min threads: 5, max threads: 5
2018-09-14T05:43:52.242492+00:00 app[web.1]: [4] * Environment: production
2018-09-14T05:43:52.242494+00:00 app[web.1]: [4] * Process workers: 2
2018-09-14T05:43:52.242498+00:00 app[web.1]: [4] * Preloading application
2018-09-14T05:44:03.889732+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:42357
2018-09-14T05:44:03.890105+00:00 app[web.1]: [4] ! WARNING: Detected 1 Thread(s) started in app boot:
2018-09-14T05:44:03.890264+00:00 app[web.1]: [4] ! #<Thread:0x00005645c567a6e0#/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:297 sleep> - /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:299:in `sleep'
2018-09-14T05:44:03.890454+00:00 app[web.1]: [4] Use Ctrl-C to stop
2018-09-14T05:44:03.937869+00:00 app[web.1]: [4] - Worker 0 (pid: 8) booted, phase: 0
2018-09-14T05:44:03.961444+00:00 app[web.1]: [4] - Worker 1 (pid: 10) booted, phase: 0
2018-09-14T05:44:04.216217+00:00 heroku[web.1]: State changed from starting to up
2018-09-14T05:44:05.299286+00:00 app[web.1]: I, [2018-09-14T05:44:05.299069 #8] INFO -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] Started GET "/" for 107.77.210.166 at 2018-09-14 05:44:05 +0000
2018-09-14T05:44:05.310460+00:00 app[web.1]: I, [2018-09-14T05:44:05.310361 #8] INFO -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] Processing by HomeBlogsController#index as HTML
2018-09-14T05:44:05.339011+00:00 app[web.1]: I, [2018-09-14T05:44:05.338894 #8] INFO -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] Rendering home_blogs/index.html.erb within layouts/application
2018-09-14T05:44:05.351987+00:00 app[web.1]: I, [2018-09-14T05:44:05.351887 #8] INFO -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] Rendered home_blogs/_team_slider.html.erb (1.9ms)
2018-09-14T05:44:05.352439+00:00 app[web.1]: I, [2018-09-14T05:44:05.352370 #8] INFO -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] Rendered home_blogs/index.html.erb within layouts/application (13.2ms)
2018-09-14T05:44:05.353290+00:00 app[web.1]: I, [2018-09-14T05:44:05.353183 #8] INFO -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] Completed 500 Internal Server Error in 40ms
2018-09-14T05:44:05.355779+00:00 app[web.1]: F, [2018-09-14T05:44:05.355705 #8] FATAL -- : [b6f95d3c-9886-456d-8be6-a2c3182228df]
2018-09-14T05:44:05.355917+00:00 app[web.1]: F, [2018-09-14T05:44:05.355854 #8] FATAL -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] ActionView::Template::Error (The asset "DanielProfile.jpeg" is not present in the asset pipeline.):
2018-09-14T05:44:05.356321+00:00 app[web.1]: F, [2018-09-14T05:44:05.356268 #8] FATAL -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] 4: <div id="team-slider">
2018-09-14T05:44:05.356338+00:00 app[web.1]: [b6f95d3c-9886-456d-8be6-a2c3182228df] 5:
2018-09-14T05:44:05.356340+00:00 app[web.1]: [b6f95d3c-9886-456d-8be6-a2c3182228df] 6: <div class="person active" id="person1">
2018-09-14T05:44:05.356342+00:00 app[web.1]: [b6f95d3c-9886-456d-8be6-a2c3182228df] 7: <%= image_tag "DanielProfile.jpeg", :id=>"daniel-pic"%>
2018-09-14T05:44:05.356343+00:00 app[web.1]: [b6f95d3c-9886-456d-8be6-a2c3182228df] 8: <figcaption><b>Daniel</b></figcaption><p id="bio-text">Info 1</p><br />
2018-09-14T05:44:05.356345+00:00 app[web.1]: [b6f95d3c-9886-456d-8be6-a2c3182228df] 9: </div>
2018-09-14T05:44:05.356346+00:00 app[web.1]: [b6f95d3c-9886-456d-8be6-a2c3182228df] 10: <div class="person" id="person2">
2018-09-14T05:44:05.356602+00:00 app[web.1]: F, [2018-09-14T05:44:05.356549 #8] FATAL -- : [b6f95d3c-9886-456d-8be6-a2c3182228df]
2018-09-14T05:44:05.356712+00:00 app[web.1]: [b6f95d3c-9886-456d-8be6-a2c3182228df] app/views/home_blogs/index.html.erb:48:in `_app_views_home_blogs_index_html_erb___3107958943898777696_47428845125780'
2018-09-14T05:44:05.356710+00:00 app[web.1]: F, [2018-09-14T05:44:05.356640 #8] FATAL -- : [b6f95d3c-9886-456d-8be6-a2c3182228df] app/views/home_blogs/_team_slider.html.erb:7:in `_app_views_home_blogs__team_slider_html_erb___1927171972031439227_47428845168680'
2018-09-14T05:44:05.358493+00:00 heroku[router]: at=info method=GET path="/" host=boiling-chamber-89366.herokuapp.com request_id=b6f95d3c-9886-456d-8be6-a2c3182228df fwd="107.77.210.166" dyno=web.1 connect=0ms service=65ms status=500 bytes=1827 protocol=https
2018-09-14T05:44:06.613224+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=boiling-chamber-89366.herokuapp.com request_id=e5ed5731-f771-4ab7-afbf-3e7f2d86d85c fwd="107.77.210.166" dyno=web.1 connect=0ms service=5ms status=200 bytes=143 protocol=https
2018-09-14T05:45:04.903443+00:00 heroku[web.1]: Restarting
2018-09-14T05:45:04.905478+00:00 heroku[web.1]: State changed from up to starting
2018-09-14T05:45:06.313295+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2018-09-14T05:45:06.335333+00:00 app[web.1]: [4] - Gracefully shutting down workers...
2018-09-14T05:45:07.214828+00:00 heroku[web.1]: Process exited with status 143
2018-09-14T05:45:17.193313+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2018-09-14T05:45:20.580532+00:00 app[web.1]: [4] Puma starting in cluster mode...
2018-09-14T05:45:20.580563+00:00 app[web.1]: [4] * Version 3.12.0 (ruby 2.3.5-p376), codename: Llamas in Pajamas
2018-09-14T05:45:20.580564+00:00 app[web.1]: [4] * Min threads: 5, max threads: 5
2018-09-14T05:45:20.580566+00:00 app[web.1]: [4] * Environment: production
2018-09-14T05:45:20.580567+00:00 app[web.1]: [4] * Process workers: 2
2018-09-14T05:45:20.580569+00:00 app[web.1]: [4] * Preloading application
2018-09-14T05:45:32.131340+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:53222
2018-09-14T05:45:32.131751+00:00 app[web.1]: [4] ! WARNING: Detected 1 Thread(s) started in app boot:
2018-09-14T05:45:32.131894+00:00 app[web.1]: [4] ! #<Thread:0x0000556669fe6350#/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:297 sleep> - /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:299:in `sleep'
2018-09-14T05:45:32.132083+00:00 app[web.1]: [4] Use Ctrl-C to stop
2018-09-14T05:45:32.154305+00:00 app[web.1]: [4] - Worker 1 (pid: 10) booted, phase: 0
2018-09-14T05:45:32.157217+00:00 app[web.1]: [4] - Worker 0 (pid: 8) booted, phase: 0
2018-09-14T05:45:32.833157+00:00 heroku[web.1]: State changed from starting to up
2018-09-14T05:45:35.047364+00:00 app[web.1]: I, [2018-09-14T05:45:35.047164 #8] INFO -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] Started GET "/" for 107.77.210.166 at 2018-09-14 05:45:35 +0000
2018-09-14T05:45:35.060284+00:00 app[web.1]: I, [2018-09-14T05:45:35.060154 #8] INFO -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] Processing by HomeBlogsController#index as HTML
2018-09-14T05:45:35.088955+00:00 app[web.1]: I, [2018-09-14T05:45:35.088816 #8] INFO -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] Rendering home_blogs/index.html.erb within layouts/application
2018-09-14T05:45:35.101253+00:00 app[web.1]: I, [2018-09-14T05:45:35.101109 #8] INFO -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] Rendered home_blogs/_team_slider.html.erb (2.7ms)
2018-09-14T05:45:35.101556+00:00 app[web.1]: I, [2018-09-14T05:45:35.101475 #8] INFO -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] Rendered home_blogs/index.html.erb within layouts/application (12.3ms)
2018-09-14T05:45:35.102302+00:00 app[web.1]: I, [2018-09-14T05:45:35.102231 #8] INFO -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] Completed 500 Internal Server Error in 41ms
2018-09-14T05:45:35.104595+00:00 app[web.1]: F, [2018-09-14T05:45:35.104479 #8] FATAL -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad]
2018-09-14T05:45:35.104745+00:00 app[web.1]: F, [2018-09-14T05:45:35.104653 #8] FATAL -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] ActionView::Template::Error (The asset "DanielProfile.jpeg" is not present in the asset pipeline.):
2018-09-14T05:45:35.105338+00:00 app[web.1]: F, [2018-09-14T05:45:35.105220 #8] FATAL -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] 4: <div id="team-slider">
2018-09-14T05:45:35.105341+00:00 app[web.1]: [3e50fd37-83b8-4d42-a369-6b03c7d87cad] 5:
2018-09-14T05:45:35.105343+00:00 app[web.1]: [3e50fd37-83b8-4d42-a369-6b03c7d87cad] 6: <div class="person active" id="person1">
2018-09-14T05:45:35.105347+00:00 app[web.1]: [3e50fd37-83b8-4d42-a369-6b03c7d87cad] 7: <%= image_tag "DanielProfile.jpeg", :id=>"daniel-pic"%>
2018-09-14T05:45:35.105349+00:00 app[web.1]: [3e50fd37-83b8-4d42-a369-6b03c7d87cad] 8: <figcaption><b>Daniel</b></figcaption><p id="bio-text">Info 1</p><br />
2018-09-14T05:45:35.105352+00:00 app[web.1]: [3e50fd37-83b8-4d42-a369-6b03c7d87cad] 9: </div>
2018-09-14T05:45:35.105354+00:00 app[web.1]: [3e50fd37-83b8-4d42-a369-6b03c7d87cad] 10: <div class="person" id="person2">
2018-09-14T05:45:35.105462+00:00 app[web.1]: F, [2018-09-14T05:45:35.105380 #8] FATAL -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad]
2018-09-14T05:45:35.105578+00:00 app[web.1]: F, [2018-09-14T05:45:35.105512 #8] FATAL -- : [3e50fd37-83b8-4d42-a369-6b03c7d87cad] app/views/home_blogs/_team_slider.html.erb:7:in `_app_views_home_blogs__team_slider_html_erb___49138702036072628_46949189469860'
2018-09-14T05:45:35.105582+00:00 app[web.1]: [3e50fd37-83b8-4d42-a369-6b03c7d87cad] app/views/home_blogs/index.html.erb:48:in `_app_views_home_blogs_index_html_erb__3183323660226002528_46949189328600'
2018-09-14T05:45:35.110118+00:00 heroku[router]: at=info method=GET path="/" host=boiling-chamber-89366.herokuapp.com request_id=3e50fd37-83b8-4d42-a369-6b03c7d87cad fwd="107.77.210.166" dyno=web.1 connect=0ms service=67ms status=500 bytes=1827 protocol=https
2018-09-14T05:45:35.913068+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=boiling-chamber-89366.herokuapp.com request_id=cdfbccd2-efcf-4a1a-8c9e-849d05efa8fd fwd="107.77.210.166" dyno=web.1 connect=0ms service=1ms status=304 bytes=48 protocol=https
▸ Log stream timed out. Please try again.
puma.rb
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end
gemfile
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.3.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
# Use sqlite3 as the database for Active Record
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'jquery-rails'
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
gem 'devise'
gem 'acts_as_votable', '~> 0.11.1'
gem 'bootstrap', '~> 4.1.1'
gem 'simple_form'
gem 'tinymce-rails-imageupload', github: 'PerfectlyNormal/tinymce-rails-imageupload'
gem 'will_paginate'
gem 'carrierwave'
gem 'mini_magick'
gem 'fog'
gem 'foundation-rails'
gem 'autoprefixer-rails'
gem 'pg'
gem "aws-sdk-s3", require: false
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15', '< 4.0'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Procfile
web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-production}
puma.rb
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end
The problem was the environment and port are already defined in puma.rb, and it need not be defined again in the Procfile. Hence the Procfile should look something like this
web: bundle exec puma -C config/puma.rb

Can't deploy a basic Rails app on Heroku

First of all I am a newbie with Ruby on Rails so sorry if the question seem stupid.
I am following a tutorial about Heroku for Rails app and when I run git push heroku master and go to check on the actual website, I get this message:
We're sorry, but something went wrong. If you are the application owner check the logs for more information.
When I run heroku logs in my console, I get the following:
2018-05-20T03:33:23.748800+00:00 app[api]: Enable Logplex by user xxx.romain#gmail.com
2018-05-20T03:33:23.554110+00:00 app[api]: Release v1 created by user xxx.romain#gmail.com
2018-05-20T03:33:23.748800+00:00 app[api]: Release v2 created by user xxx.romain#gmail.com
2018-05-20T03:33:23.554110+00:00 app[api]: Initial release by user xxx.romain#gmail.com
2018-05-20T03:33:46.000000+00:00 app[api]: Build started by user xxx.romain#gmail.com
2018-05-20T03:34:29.457658+00:00 app[api]: Set LANG, RACK_ENV, RAILS_ENV, RAILS_LOG_TO_STDOUT, RAILS_SERVE_STATIC_FILES, SECRET_KEY_BASE config vars by user xxx.romain#gmail.com
2018-05-20T03:34:29.457658+00:00 app[api]: Release v3 created by user xxx.romain#gmail.com
2018-05-20T03:34:30.828730+00:00 app[api]: Release v4 created by user xxx.romain#gmail.com
2018-05-20T03:34:30.828730+00:00 app[api]: Attach DATABASE (#ref:postgresql-tapered-27211) by user xxx.romain#gmail.com
2018-05-20T03:34:31.131189+00:00 app[api]: Scaled to console#0:Free rake#0:Free web#1:Free worker#0:Free by user xxx.romain#gmail.com
2018-05-20T03:34:31.115804+00:00 app[api]: Release v5 created by user xxx.romain#gmail.com
2018-05-20T03:34:31.115804+00:00 app[api]: Deploy 0248e11a by user xxx.romain#gmail.com
2018-05-20T03:34:31.000000+00:00 app[api]: Build succeeded
2018-05-20T03:34:36.168184+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 57618 -e production`
2018-05-20T03:34:41.855283+00:00 app[web.1]: => Booting Puma
2018-05-20T03:34:41.855302+00:00 app[web.1]: => Rails 5.1.6 application starting in production
2018-05-20T03:34:41.855303+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-05-20T03:34:41.855305+00:00 app[web.1]: Puma starting in single mode...
2018-05-20T03:34:41.855313+00:00 app[web.1]: * Version 3.11.4 (ruby 2.3.4-p301), codename: Love Song
2018-05-20T03:34:41.855315+00:00 app[web.1]: * Min threads: 5, max threads: 5
2018-05-20T03:34:41.855316+00:00 app[web.1]: * Environment: production
2018-05-20T03:34:41.855503+00:00 app[web.1]: * Listening on tcp://0.0.0.0:57618
2018-05-20T03:34:41.855969+00:00 app[web.1]: Use Ctrl-C to stop
2018-05-20T03:34:42.411033+00:00 heroku[web.1]: State changed from starting to up
2018-05-20T03:34:43.450895+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] Started GET "/" for 27.32.8.50 at 2018-05-20 03:34:43 +0000
2018-05-20T03:34:43.487004+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] Rendering keywords/index.html.erb within layouts/application
2018-05-20T03:34:43.463124+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] Processing by KeywordsController#index as HTML
2018-05-20T03:34:44.722888+00:00 heroku[router]: at=info method=GET path="/" host=tweetscoperm.herokuapp.com request_id=5a2cc1ab-9701-42e6-accc-2f372ff837f1 fwd="27.32.8.50" dyno=web.1 connect=1ms service=1278ms status=500 bytes=1827 protocol=https
2018-05-20T03:34:44.715829+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] Keyword Load (2.3ms) SELECT "keywords".* FROM "keywords"
2018-05-20T03:34:44.717471+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] Rendered keywords/index.html.erb within layouts/application (1230.3ms)
2018-05-20T03:34:44.717773+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] Completed 500 Internal Server Error in 1254ms (ActiveRecord: 33.5ms)
2018-05-20T03:34:44.719239+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1]
2018-05-20T03:34:44.720128+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "keywords" does not exist
2018-05-20T03:34:44.720132+00:00 app[web.1]: ^
2018-05-20T03:34:44.720130+00:00 app[web.1]: LINE 1: SELECT "keywords".* FROM "keywords"
2018-05-20T03:34:44.720134+00:00 app[web.1]: : SELECT "keywords".* FROM "keywords"):
2018-05-20T03:34:44.720461+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] 11: </thead>
2018-05-20T03:34:44.720464+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] 12:
2018-05-20T03:34:44.720466+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] 13: <tbody>
2018-05-20T03:34:44.720468+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] 14: <% #keywords.each do |keyword| %>
2018-05-20T03:34:44.720469+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] 15: <tr>
2018-05-20T03:34:44.720471+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] 16: <td><%= keyword.word %></td>
2018-05-20T03:34:44.720473+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] 17: <td><%= link_to 'Show', keyword %></td>
2018-05-20T03:34:44.720531+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1]
2018-05-20T03:34:44.720593+00:00 app[web.1]: [5a2cc1ab-9701-42e6-accc-2f372ff837f1] app/views/keywords/index.html.erb:14:in `_app_views_keywords_index_html_erb___2939922413078681924_23601960'
2018-05-20T03:34:45.523130+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tweetscoperm.herokuapp.com request_id=ec46bf49-b91c-4bf2-b017-a15b4cef63a8 fwd="27.32.8.50" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https
Looking at that, I couldn't find any reason that would cause a problem.
So far, here is how my database.yml file looks like:
development:
adapter: postgresql
database: tscope_dev
pool: 5
timeout: 5000
test:
adapter: postgresql
database: tscope_test
pool: 5
timeout: 5000
production:
adapter: postgresql
database: tscope_production
pool: 5
timeout: 5000
And my gemfile:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.6'
# Use sqlite3 as the database for Active Record
# gem 'sqlite3'
# Using PostgreSQL as DB
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'rails_12factor', group: :production
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
ruby '2.3.4'
I created the databse and did the migrations and also ran bundle install as well. It is the most basic application with just one controller generated with a scaffold.
Does anybody has any idea of what could be the problem? Even the smallest tip would help me since I really don't know what to look at right now.
If you need any futher information about my code, feel free to ask.
Thanks in advance :)
EDIT
Solved this issue by running heroku run rake db:migratein the console.
Turned out I haven't ran the migration on Heroku.
This line:
ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "keywords" does not exist
suggests you haven't run your migrations on heroku.
To do that, in your console do:
heroku run rake db:migrate

missing required flag heroku tail

I am working to deploy my rails app. Everything in running in local environment but I am having some issues making my first push to heroku. I am getting the standard app error, see pic:
when i run the command heroku logs --tail, i get the following error:
my gemfile is as so:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
# Use sqlite3 as the database for Active Record
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
group :development do
gem 'sqlite3'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
group :production do
gem 'pg'
end
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
below are my heroku logs:
2
018-02-09T00:48:11.108425+00:00 app[web.1]: from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
2018-02-09T00:48:11.108427+00:00 app[web.1]: from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
2018-02-09T00:48:11.108435+00:00 app[web.1]: from bin/rails:3:in `load'
2018-02-09T00:48:11.108437+00:00 app[web.1]: from bin/rails:3:in `<main>'
2018-02-09T00:48:11.120606+00:00 app[web.1]: => Booting WEBrick
2018-02-09T00:48:11.120615+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:52651
2018-02-09T00:48:11.120619+00:00 app[web.1]: => Ctrl-C to shutdown server
2018-02-09T00:48:11.120618+00:00 app[web.1]: => Run `rails server -h` for more startup options
2018-02-09T00:48:11.120621+00:00 app[web.1]: Exiting
2018-02-09T00:49:30.407211+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=postcable.herokuapp.com request_id=ec520950-df52-44ee-95aa-890d9ad76949 fwd="67.20.250.6" dyno= connect= service= status=503 bytes= protocol=https
2018-02-09T00:49:32.372812+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=postcable.herokuapp.com request_id=ffdb944b-9293-4d96-8986-b0af2974704c fwd="67.20.250.6" dyno= connect= service= status=503 bytes= protocol=https
First of all, to get the log error to work correctly also pass a flag for your app name as well:
heroku logs --tail --app my_heroku_app_name
Also, it seems you have nested gem groups. I am assuming you are using postgresql as your database for production so I would recommend to move pg out of development>production group like so:
gem 'pg'
group :development do
gem 'sqlite3'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
end
Then run
bundle install
Lastly, try pushing to heroku again with
git push heroku master
I solved, needed to define the PG version in my gemfile:
gem 'pg', '~> 0.18.4'

Errors in Gemfile

I've cloned my app from Github but I've got errors on Gemfile. So I think, this app. is still running on heroku and it said that all up to date when I've used following commands:
git status
//On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
git push heroku
//Everything up-to-date
Also I could see output in heroku.
How to fix the error in Gemfile?
thanks.
//error as below:
There was an error parsing `Gemfile`: The `branch` option for `gem 'recaptcha'` is not allowed. Only gems with a git source can specify a branch. Bundler cannot continue.
# from /home/ubuntu/workspace/typo-1/Gemfile:46
# -------------------------------------------
# gem 'acts_as_tree_rails3'
> gem 'recaptcha', :require => 'recaptcha/rails', :branch => 'rails3'
#
//Gemfile
env = ENV["RAILS_ENV"] || 'development'
dbfile = File.expand_path("../config/database.yml", __FILE__)
#unless File.exists?(dbfile)
# raise "You need to configure config/database.yml first"
#else
# conf = YAML.load(File.read(dbfile))
# adapter = conf[env]['adapter']
# raise "You need define an adapter in your database.yml" if adapter == '' || adapter.nil?
# case adapter
# when 'sqlite3'
# gem 'sqlite3'
# when 'postgresql'
# gem 'pg'
# when 'mysql'
# gem 'sam-mysql-ruby'
# else
# raise "Don't know what gem to use for adapter #{adapter}"
# end
#end
group :production do
gem 'pg'
end
source 'https://rubygems.org'
ruby "1.9.3"
gem 'thin'
gem 'rails', '~> 3.0.10'
gem 'require_relative'
gem 'htmlentities'
gem 'json'
gem 'bluecloth', '~> 2.1'
gem 'coderay', '~> 0.9'
gem 'kaminari'
gem 'RedCloth', '~> 4.2.8'
gem 'addressable', '~> 2.1', :require => 'addressable/uri'
gem 'mini_magick', '~> 1.3.3', :require => 'mini_magick'
gem 'uuidtools', '~> 2.1.1'
gem 'flickraw-cached'
gem 'rubypants', '~> 0.2.0'
gem 'rake', '~> 0.9.2'
gem 'acts_as_list'
gem 'acts_as_tree_rails3'
gem 'recaptcha', :require => 'recaptcha/rails', :branch => 'rails3'
group :development, :test do
gem 'ruby-debug19'
gem 'factory_girl', '~> 2.2'
gem 'webrat'
gem 'rspec-rails', '~> 2.0'
gem 'simplecov', :require => false
gem 'sqlite3'
gem 'cucumber'
gem 'cucumber-rails', :require => false
gem 'cucumber-rails-training-wheels'
gem 'database_cleaner'
gem 'capybara'
end
//edited
I took off branch but got error as below when run bundle install:
bundle install
"Your Ruby version is 2.3.0, but your Gemfile specified 1.9.3"
Version 2.4 create the same error. So,I've changed to 2.3.0 - it went through until another error as below:
Results logged to
/usr/local/rvm/gems/ruby-2.3.0/extensions/x86_64-linux/2.3.0/json-1.7.5/gem_make.out
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure that gem install json -v '1.7.5' succeeds before bundling.
//editing
I've follow the answer suggested to use the old version 1.9.2 and I be able to use command bundle install but after pushing to heroku, I've got empty page on heroku and errors as below:
//errors
2017-07-23T18:09:50.995656+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2017-07-23T18:09:50.995657+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:71:in `start'
2017-07-23T18:09:50.995657+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command'
2017-07-23T18:09:50.995658+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!'
2017-07-23T18:09:50.995659+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/bin/thin:6:in `<top (required)>'
2017-07-23T18:09:50.995659+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2017-07-23T18:09:50.995660+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<top (required)>'
2017-07-23T18:09:51.185918+00:00 heroku[web.1]: Process exited with status 1
2017-07-23T18:09:51.200309+00:00 heroku[web.1]: State changed from starting to crashed
2017-07-23T18:09:51.845236+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=typoa.herokuapp.com request_id=7c8caa3e-8bad-4431-9da6-8ddf2f52a4d1 fwd="108.211.182.6" dyno= connect= service= status=503 bytes= protocol=https
2017-07-23T18:19:04.542770+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=typoa.herokuapp.com request_id=798e1c83-078a-4da6-b2cd-dfbf47b80687 fwd="108.211.182.6" dyno= connect= service= status=503 bytes= protocol=https
//edited
When I took off suggested line( with recaptcha), I could not see app. locally.
With this line I could see app. locally.
Errors without this line as below:
rails server -b $IP -p $PORT
=> Booting WEBrick
=> Rails 3.0.17 application starting in development on http://0.0.0.0:8080
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
home/ubuntu/workspace/typo-1/config/initializers/recaptcha.rb:1:in `<top (required)>': uninitialized constant Recaptcha (NameError)
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.0.17/lib/rails/engine.rb:201:in `block (2 levels) in <class:Engine>'
In any cases, I could not push to heroku:
Errors as below(it recommends to use the latest version of Ruby):
Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: !
remote: ! An error occurred while installing ruby-1.9.3
remote: !
remote: ! Heroku recommends you use the latest supported Ruby version listed here:
//edit
I could not find a working app to see the solution of this problem...Error message as below:
http://typosphere.org/stable.tar.gz#
1- In reCAPTCHA project on Github there is not a branch rails3, so, remove that piece of your Gemfile.
gem 'recaptcha', :require => 'recaptcha/rails'
2- Since you are using ruby 2.2.x, and in Gemfile is 1.9.3 I suggest that you should install 1.9.3 (via rvm or via rvm or whatever you use to manage your ruby versions) in your machine and work with that in order to avoid other conflicts you may find, because you are using a legacy code.
rvm install 1.9.3
rvm use 1.9.3
now install gem bundler and after that blundle install your Gemfile
I did not get this error using Ruby 2.4.1. I did get the same error when I changed versions to 1.9.3, as specified in the Gemfile. I also don't see a branch called rails3 at the source on Github. I would try removing the branch option first.
gem 'recaptcha', require: 'recaptcha/rails'

Error when pushing code to Heroku

I am running my app locally without issue. I created a heroku account and pushed my code up to heroku, however I am getting a general error saying "something went wrong" I pasted my heroku logs below...I am new to Heroku so I am not sure what the issue is here?
gemfile:
source 'https://rubygems.org'
ruby "2.1.5"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
# Use sqlite3 as the database for Active Record
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'bootstrap-sass'
gem "paperclip", "~> 4.3"
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development, :test do
gem 'sqlite3'
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
heroku logs:
Art West#ARTWESTIV /c/Sites
$ cd ~/desktop
Art West#ARTWESTIV ~/desktop
$ cd yahozzle
Art West#ARTWESTIV ~/desktop/yahozzle (master)
$ heroku logs
Your version of git is 1.9.4.. Which has serious security vulnerabilities.
More information here: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x
2015-12-18T21:29:15.599176+00:00 heroku[api]: Enable Logplex by art.westiv#gmail.com
2015-12-18T21:29:15.599176+00:00 heroku[api]: Release v2 created by art.westiv#gmail.com
2015-12-18T21:31:53.237831+00:00 heroku[api]: Set LANG, RAILS_ENV, RACK_ENV, SECRET_KEY_BASE config vars by art.westiv#gmail.com
2015-12-18T21:31:53.237888+00:00 heroku[api]: Release v3 created by art.westiv#gmail.com
2015-12-18T21:31:53.708634+00:00 heroku[api]: Release v4 created by art.westiv#gmail.com
2015-12-18T21:31:53.708634+00:00 heroku[api]: Attach DATABASE resource by art.westiv#gmail.com
2015-12-18T21:31:54.021633+00:00 heroku[api]: Scale to web=1 by art.westiv#gmail.com
2015-12-18T21:31:54.098158+00:00 heroku[api]: Deploy fa5366d by art.westiv#gmail.com
2015-12-18T21:31:54.098248+00:00 heroku[api]: Release v5 created by art.westiv#gmail.com
2015-12-18T21:31:54.415009+00:00 heroku[slug-compiler]: Slug compilation started
2015-12-18T21:31:54.415020+00:00 heroku[slug-compiler]: Slug compilation finished
2015-12-18T21:31:56.834536+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 26611 -e production`
2015-12-18T21:31:59.899640+00:00 app[web.1]: [2015-12-18 21:31:59] INFO WEBrick 1.3.1
2015-12-18T21:31:59.899656+00:00 app[web.1]: [2015-12-18 21:31:59] INFO ruby 2.1.5 (2014-11-13) [x86_64-linux]
2015-12-18T21:31:59.899909+00:00 app[web.1]: [2015-12-18 21:31:59] INFO WEBrick::HTTPServer#start: pid=3 port=26611
2015-12-18T21:32:00.158746+00:00 heroku[web.1]: State changed from starting to up
2015-12-18T21:33:25.989345+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by art.westiv#gmail.com
2015-12-18T21:33:28.792631+00:00 heroku[run.5244]: Awaiting client
2015-12-18T21:33:28.809492+00:00 heroku[run.5244]: Starting process with command `bundle exec rake db:migrate`
2015-12-18T21:33:32.849960+00:00 heroku[run.5244]: Process exited with status 0
2015-12-18T21:33:29.135341+00:00 heroku[run.5244]: State changed from starting to up
2015-12-18T21:34:04.260094+00:00 heroku[router]: at=info method=GET path="/" host=yahozzle.herokuapp.com request_id=8f3e052b-5e55-4822-ac3f-be728a04aacd fwd="206.123.254.90" dyno=web.1 connect=2ms service=62ms status=500 bytes=1754
2015-12-18T21:34:04.183773+00:00 app[web.1]: => Booting WEBrick
2015-12-18T21:34:04.183780+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-12-18T21:34:04.183778+00:00 app[web.1]: => Rails 4.1.8 application starting in production on http://0.0.0.0:26611
2015-12-18T21:34:04.183781+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2015-12-18T21:34:04.183782+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-12-18T21:34:04.183782+00:00 app[web.1]: Started GET "/" for 206.123.254.90 at 2015-12-18 21:34:04 +0000
2015-12-18T21:34:04.225082+00:00 app[web.1]: Processing by ListingsController#index as HTML
2015-12-18T21:34:04.238797+00:00 app[web.1]: Completed 500 Internal Server Error in 14ms
2015-12-18T21:34:04.236903+00:00 app[web.1]: Rendered listings/index.html.erb within layouts/application (3.6ms)
2015-12-18T21:34:04.240033+00:00 app[web.1]: * "/app/app/views"
2015-12-18T21:34:04.240029+00:00 app[web.1]:
2015-12-18T21:34:04.240032+00:00 app[web.1]: ActionView::Template::Error (Missing partial Layouts/_header with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
2015-12-18T21:34:04.240034+00:00 app[web.1]: ):
2015-12-18T21:34:04.240034+00:00 app[web.1]: 8: </head>
2015-12-18T21:34:04.240035+00:00 app[web.1]: 9:
2015-12-18T21:34:04.240035+00:00 app[web.1]: 10: <body>
2015-12-18T21:34:04.240036+00:00 app[web.1]: 11: <%= render 'Layouts/header' %>
2015-12-18T21:34:04.240036+00:00 app[web.1]: 12: <div class="container">
2015-12-18T21:34:04.240037+00:00 app[web.1]: 13: <%= yield %>
2015-12-18T21:34:04.240038+00:00 app[web.1]: app/views/layouts/application.html.erb:11:in `_app_views_layouts_application_html_erb__2488562101803348584_70335066715400'
2015-12-18T21:34:04.240037+00:00 app[web.1]: 14: <%= render 'Layouts/footer' %>
2015-12-18T21:34:04.240039+00:00 app[web.1]:
2015-12-18T21:34:04.240039+00:00 app[web.1]:
2015-12-18T21:34:04.722117+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=yahozzle.herokuapp.com request_id=f61364ff-7a3e-41c2-865c-51229d244cd1 fwd="206.123.254.90" dyno=web.1 connect=0ms service=3ms status=200 bytes=228
2015-12-18T21:35:06.875160+00:00 app[web.1]: Started GET "/" for 206.123.254.90 at 2015-12-18 21:35:06 +0000
2015-12-18T21:35:06.880338+00:00 app[web.1]: Rendered listings/index.html.erb within layouts/application (2.0ms)
2015-12-18T21:35:06.883137+00:00 app[web.1]:
2015-12-18T21:35:06.883142+00:00 app[web.1]: * "/app/app/views"
2015-12-18T21:35:06.883141+00:00 app[web.1]: ActionView::Template::Error (Missing partial Layouts/_header with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
2015-12-18T21:35:06.883143+00:00 app[web.1]: ):
2015-12-18T21:35:06.883144+00:00 app[web.1]: 9:
2015-12-18T21:35:06.883143+00:00 app[web.1]: 8: </head>
2015-12-18T21:35:06.883145+00:00 app[web.1]: 11: <%= render 'Layouts/header' %>
2015-12-18T21:35:06.883145+00:00 app[web.1]: 10: <body>
2015-12-18T21:35:06.883146+00:00 app[web.1]: 12: <div class="container">
2015-12-18T21:35:06.883147+00:00 app[web.1]: 14: <%= render 'Layouts/footer' %>
2015-12-18T21:35:06.883147+00:00 app[web.1]: 13: <%= yield %>
2015-12-18T21:35:06.883149+00:00 app[web.1]:
2015-12-18T21:35:06.883148+00:00 app[web.1]: app/views/layouts/application.html.erb:11:in `_app_views_layouts_application_html_erb__2488562101803348584_70335066715400'
2015-12-18T21:35:06.883150+00:00 app[web.1]:
2015-12-18T21:35:06.877226+00:00 app[web.1]: Processing by ListingsController#index as HTML
2015-12-18T21:35:06.881799+00:00 app[web.1]: Completed 500 Internal Server Error in 4ms
2015-12-18T21:35:06.863666+00:00 heroku[router]: at=info method=GET path="/" host=yahozzle.herokuapp.com request_id=efaaeab9-ce24-4513-9e1d-7ebe584ef31a fwd="206.123.254.90" dyno=web.1 connect=1ms service=16ms status=500 bytes=1754
2015-12-18T21:35:07.337234+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=yahozzle.herokuapp.com request_id=0bb618cf-9bbe-402e-81bb-973771eca373 fwd="206.123.254.90" dyno=web.1 connect=1ms service=4ms status=200 bytes=228
Your logs show the error - the application tries to render partials it cannot find. Pay attention to file name's case - Heroku's filesystem is case sensitive, and my guess is that you have a directory app/views/layouts but in your erb files you refer to it as Layouts.
The last error it logged is:
ActionView::Template::Error (Missing partial Layouts/_header with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
* "/app/app/views"
app/views/layouts/application.html.erb:11:in `_app_views_layouts_application_html_erb
I suggest checking to see if you committed the _header partial so that it pushes to Heroku, or checking to see if the partial is named correctly and not a typo. You can ssh into the Heroku server to check if the file exists:
heroku run bash
Then, just cd into the views directory and ls to list its contents to find the file, make sure it's in the spot you expected.
The other issue is given here:
Your version of git is 1.9.4.. Which has serious security vulnerabilities.
More information here: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x
You can read about that at the given url: https://blog.heroku.com/archives/2014/12/23/update_your_git_clients_on_windows_and_os_x

Resources