0

I am trying to deploy to Heroku but am getting the dreaded "The page you were looking for doesn't exist." error on all pages. After reading similar issues, I've checked my routes file but all looks okay to me. Here's what I have:

Gemfile:

source 'https://rubygems.org'
ruby '2.1.1'
gem 'rails', '4.1.0'
gem 'bootstrap-sass', '~> 3.1.1.1'
gem 'sprockets', '~> 2.11.0'
gem 'bcrypt', '~> 3.1.5'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'spring',        group: :development
group :development do
  gem 'better_errors'
  gem 'binding_of_caller', :platforms=>[:mri_19, :mri_20, :mri_21, :rbx]
  gem 'quiet_assets'
  gem 'rails_layout'
end
group :development, :test do
  gem 'sqlite3'
  gem 'factory_girl_rails'
  gem 'rspec-rails', '~> 2.14.1'
end
group :production do
  gem 'thin'
  gem 'pg', '~> 0.17.1'
  gem 'rails_12factor', '~> 0.0.2'
end
group :test do
  gem 'capybara'
  gem 'database_cleaner'
  gem 'faker'
  gem 'launchy'
  gem 'selenium-webdriver'
end

routes.rb:

Hartl::Application.routes.draw do

    root to: 'static_pages#home'

    resources :users

    match '/help',    to: 'static_pages#help',    via: 'get'
    match '/about',   to: 'static_pages#about',   via: 'get'
    match '/contact', to: 'static_pages#contact', via: 'get'
    match '/signup',  to: 'users#new',            via: 'get'

end

Heroku logs:

2014-05-01T14:38:40.012807+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2014-05-01T14:38:40.012822+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
2014-05-01T14:38:40.012846+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
2014-05-01T14:38:40.012799+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/static.rb:64:in `call'
2014-05-01T14:38:40.012819+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:39:in `receive_data'
2014-05-01T14:38:40.012844+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-05-01T14:38:40.012809+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/engine.rb:514:in `call'
2014-05-01T14:38:40.012823+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
2014-05-01T14:38:40.012847+00:00 app[web.1]:   bin/rails:8:in `require'
2014-05-01T14:38:40.012793+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `call'
2014-05-01T14:38:40.012812+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-05-01T14:38:40.012831+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-05-01T14:38:40.012810+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:144:in `call'
2014-05-01T14:38:40.012825+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
2014-05-01T14:38:40.012813+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:86:in `block in pre_process'
2014-05-01T14:38:40.012826+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run'
2014-05-01T14:38:40.012850+00:00 app[web.1]: 
2014-05-01T14:38:40.012815+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `catch'
2014-05-01T14:38:40.012828+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2014-05-01T14:38:40.012851+00:00 app[web.1]: 
2014-05-01T14:38:40.012816+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `pre_process'
2014-05-01T14:38:40.012829+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/server.rb:69:in `start'
2014-05-01T14:38:40.005302+00:00 app[web.1]: Started GET "/users" for 69.245.11.208 at 2014-05-01 14:38:40 +0000
2014-05-01T14:38:40.012849+00:00 app[web.1]:   bin/rails:8:in `<main>'
2014-05-01T14:44:38.389637+00:00 heroku[run.7236]: State changed from starting to up
2014-05-01T14:44:38.316951+00:00 heroku[run.7236]: Awaiting client
2014-05-01T14:44:38.372859+00:00 heroku[run.7236]: Starting process with command `bundle exec rake db:migrate`
2014-05-01T14:44:45.056822+00:00 heroku[run.7236]: State changed from up to complete
2014-05-01T14:44:48.286258+00:00 heroku[router]: at=info method=GET path=/ host=still-wave-7596.herokuapp.com request_id=9a553d21-ab0e-4c21-9fb1-9d7cc020c059 fwd="69.245.11.208" dyno=web.1 connect=3ms service=13ms status=404 bytes=1828
2014-05-01T14:44:48.273634+00:00 app[web.1]: Started GET "/" for 69.245.11.208 at 2014-05-01 14:44:48 +0000
2014-05-01T14:44:48.282633+00:00 app[web.1]: 
2014-05-01T14:44:48.282654+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:71:in `block in call'
2014-05-01T14:44:48.282670+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2014-05-01T14:44:48.282688+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `tagged'
2014-05-01T14:44:48.282638+00:00 app[web.1]: ActionController::RoutingError (uninitialized constant StaticPagesController):
2014-05-01T14:44:48.282656+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:in `each'
2014-05-01T14:44:48.282673+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
2014-05-01T14:44:48.282690+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `call'
2014-05-01T14:44:48.282709+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-05-01T14:44:48.282643+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:238:in `block in constantize'
2014-05-01T14:44:48.282659+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:676:in `call'
2014-05-01T14:44:48.282677+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-05-01T14:44:48.282691+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-05-01T14:44:48.282710+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:86:in `block in pre_process'
2014-05-01T14:44:48.282641+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:238:in `const_get'
2014-05-01T14:44:48.282657+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:in `call'
2014-05-01T14:44:48.282669+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2014-05-01T14:44:48.282680+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2014-05-01T14:44:48.282693+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-05-01T14:44:48.282712+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `catch'
2014-05-01T14:44:48.282645+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:236:in `each'
2014-05-01T14:44:48.282660+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2014-05-01T14:44:48.282675+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2014-05-01T14:44:48.282687+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:26:in `tagged'
2014-05-01T14:44:48.282704+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-05-01T14:44:48.282718+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
2014-05-01T14:44:48.282729+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
2014-05-01T14:44:48.282647+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:236:in `inject'
2014-05-01T14:44:48.282662+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2014-05-01T14:44:48.282672+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.0/lib/active_record/query_cache.rb:36:in `call'
2014-05-01T14:44:48.282683+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:38:in `call_app'
2014-05-01T14:44:48.282705+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2014-05-01T14:44:48.282720+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
2014-05-01T14:44:48.282733+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
2014-05-01T14:44:48.282648+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/inflector/methods.rb:236:in `constantize'
2014-05-01T14:44:48.282664+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2014-05-01T14:44:48.282679+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2014-05-01T14:44:48.282694+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-05-01T14:44:48.282715+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:53:in `process'
2014-05-01T14:44:48.282726+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2014-05-01T14:44:48.282739+00:00 app[web.1]: 
2014-05-01T14:44:48.282650+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:76:in `controller_reference'
2014-05-01T14:44:48.282663+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2014-05-01T14:44:48.282676+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:82:in `run_callbacks'
2014-05-01T14:44:48.282684+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in `block in call'
2014-05-01T14:44:48.282697+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/static.rb:64:in `call'
2014-05-01T14:44:48.282717+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:39:in `receive_data'
2014-05-01T14:44:48.282727+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/server.rb:69:in `start'
2014-05-01T14:44:48.282740+00:00 app[web.1]: 
2014-05-01T14:44:48.282651+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:66:in `controller'
2014-05-01T14:44:48.282666+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/flash.rb:254:in `call'
2014-05-01T14:44:48.282686+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2014-05-01T14:44:48.282706+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/engine.rb:514:in `call'
2014-05-01T14:44:48.282721+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/backends/base.rb:73:in `start'
2014-05-01T14:44:48.282736+00:00 app[web.1]:   bin/rails:8:in `require'
2014-05-01T14:44:48.282653+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:44:in `call'
2014-05-01T14:44:48.282667+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
2014-05-01T14:44:48.282682+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/actionpack-4.1.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-05-01T14:44:48.282696+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/activesupport-4.1.0/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2014-05-01T14:44:48.282714+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/connection.rb:84:in `pre_process'
2014-05-01T14:44:48.282734+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
2014-05-01T14:44:48.282708+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/application.rb:144:in `call'
2014-05-01T14:44:48.282723+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/thin-1.6.2/lib/thin/server.rb:162:in `start'
2014-05-01T14:44:48.282725+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run'
2014-05-01T14:44:48.282737+00:00 app[web.1]:   bin/rails:8:in `<main>'
2014-05-01T14:44:48.282730+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
2014-05-01T14:44:48.282732+00:00 app[web.1]:   vendor/bundle/ruby/2.1.0/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
2014-05-01T14:44:48.606159+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=still-wave-7596.herokuapp.com request_id=4349600e-547a-495f-9f3c-81ce35f74539 fwd="69.245.11.208" dyno=web.1 connect=3ms service=3ms status=304 bytes=132
2014-05-01T14:44:45.060196+00:00 heroku[run.7236]: Process exited with status 0
2014-05-01T14:44:53.122516+00:00 heroku[router]: at=info method=GET path=/ host=still-wave-7596.herokuapp.com request_id=a535fff0-91ec-4420-b5cb-cfc5f558ac8d fwd="69.245.11.208" dyno=web.1 connect=4ms service=9ms status=404 bytes=1828
2014-05-01T14:44:53.116717+00:00 app[web.1]: Started GET "/" for 69.245.11.208 at 2014-05-01 14:44:53 +0000

Edit: Just saw the issue in the logs with the StaticPagesController. I am probably blind but I still cannot see the issue. Here is the file:

static_pages_controller.rb

class StaticPagesController < ApplicationController
  def home
  end

  def help
  end

  def about
  end

  def contact
  end

end

Edit 2: Longer Heroku logs added:

http://pastebin.com/AxSHivmD

Comment for any additional files required to diagnose the issue. Thanks!

Khundawg
  • 17
  • 1
  • 6

0 Answers0