I have been working on an app locally for a while now, and I've matched my development environment to that on Heroku as closely as I can.
The app is set up for multi-tenancy using Apartment (https://github.com/influitive/apartment), and designed to use subdomains to identify tenants. Both environments use postgres, and Apartment has been using schemas to manage the 'tanants' data.
This evening, I have attempted to push the code to Heroku (the same app before it became multi-tenancy worked beautifully), and no pages load, all give an error.
I've taken a look at the logs, and the most interesting line I can find is; Apartment::SchemaNotFound (One of the following schema(s) is invalid: heroku-app-name, "public"):
This certainly seems to be a peculiarity of Heroku, but I'm struggling for ideas on where to look next.
Any suggestions or help would be appreciated.
I've included all of the logs for reference;
2014-04-04T18:27:09.884367+00:00 app[web.1]: Apartment::SchemaNotFound (One of the following schema(s) is invalid: heroku-app-name, "public"):
2014-04-04T18:27:09.884368+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/apartment-0.24.3/lib/apartment/adapters/postgresql_adapter.rb:95:in `rescue in connect_to_new'
2014-04-04T18:27:09.884384+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2014-04-04T18:27:09.884362+00:00 app[web.1]:
2014-04-04T18:27:09.884385+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2014-04-04T18:27:09.884364+00:00 app[web.1]: I, [2014-04-04T18:27:09.879482 #2] INFO -- : Started GET "/favicon.ico" for 92.25.163.224 at 2014-04-04 18:27:09 +0000
2014-04-04T18:27:09.884388+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2014-04-04T18:27:09.884389+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/flash.rb:241:in `call'
2014-04-04T18:27:09.884366+00:00 app[web.1]: F, [2014-04-04T18:27:09.884136 #2] FATAL -- :
2014-04-04T18:27:09.884370+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/apartment-0.24.3/lib/apartment/adapters/postgresql_adapter.rb:88:in `connect_to_new'
2014-04-04T18:27:09.884381+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2014-04-04T18:27:09.884371+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/apartment-0.24.3/lib/apartment/adapters/abstract_adapter.rb:100:in `switch'
2014-04-04T18:27:09.884383+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2014-04-04T18:27:09.884396+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
2014-04-04T18:27:09.884372+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/apartment-0.24.3/lib/apartment/elevators/generic.rb:20:in `call'
2014-04-04T18:27:09.884387+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2014-04-04T18:27:09.884398+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2014-04-04T18:27:09.884403+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2014-04-04T18:27:09.884391+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
2014-04-04T18:27:09.884392+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
2014-04-04T18:27:09.884399+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__2212192162733263500__call__callbacks'
2014-04-04T18:27:09.884400+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
2014-04-04T18:27:09.884393+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/cookies.rb:486:in `call'
2014-04-04T18:27:09.884402+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-04-04T18:27:09.884406+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-04-04T18:27:09.884379+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2014-04-04T18:27:09.884395+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/query_cache.rb:36:in `call'
2014-04-04T18:27:09.884409+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `block in call'
2014-04-04T18:27:09.884407+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:38:in `call_app'
2014-04-04T18:27:09.884410+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `block in tagged'
2014-04-04T18:27:09.884404+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2014-04-04T18:27:09.884430+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `tagged'
2014-04-04T18:27:09.884431+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `call'
2014-04-04T18:27:09.884432+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-04-04T18:27:09.884428+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:25:in `tagged'
2014-04-04T18:27:09.884435+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-04-04T18:27:09.884444+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call'
2014-04-04T18:27:09.884434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-04-04T18:27:09.884437+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2014-04-04T18:27:09.884442+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2014-04-04T18:27:09.884445+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-04-04T18:27:09.884448+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-04-04T18:27:09.884446+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-04-04T18:27:09.884450+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2014-04-04T18:27:09.884451+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-04-04T18:27:09.884452+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Take a look at your apartment initializer and remove the subdomain elevator settings. i commented out everything related to elevator. since your app is probably on a heroku subdomain, the elevator setting will try to load that particular tenant from the db and will issue that error.
it worked fine for me after i commented
# Rails.application.config.middleware.use 'Apartment::Elevators::Subdomain'
Related
I saw many solutions for this question but nothing solve mine please help me in this!
I got this error after adding 404 error html page for my ruby on rails app
ActiveRecord::ConnectionTimeoutError (could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)):
2018-12-22T06:37:29.341798+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `block in wait_poll'
2018-12-22T06:37:29.341800+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `loop'
2018-12-22T06:37:29.341802+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `wait_poll'
2018-12-22T06:37:29.341804+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:136:in `block in poll'
2018-12-22T06:37:29.341806+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
2018-12-22T06:37:29.341808+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:146:in `synchronize'
2018-12-22T06:37:29.341810+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:134:in `poll'
2018-12-22T06:37:29.341812+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:418:in `acquire_connection'
2018-12-22T06:37:29.341814+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
2018-12-22T06:37:29.341816+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
2018-12-22T06:37:29.341818+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
2018-12-22T06:37:29.341820+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
2018-12-22T06:37:29.341821+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
2018-12-22T06:37:29.341823+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
2018-12-22T06:37:29.341825+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
2018-12-22T06:37:29.341827+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
2018-12-22T06:37:29.341829+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_handling.rb:87:in `connection'
2018-12-22T06:37:29.341831+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/query_cache.rb:51:in `restore_query_cache_settings'
2018-12-22T06:37:29.341833+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/query_cache.rb:43:in `rescue in call'
2018-12-22T06:37:29.341834+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/query_cache.rb:32:in `call'
2018-12-22T06:37:29.341836+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
2018-12-22T06:37:29.341838+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2018-12-22T06:37:29.341840+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:82:in `run_callbacks'
2018-12-22T06:37:29.341841+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2018-12-22T06:37:29.341843+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2018-12-22T06:37:29.341845+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2018-12-22T06:37:29.341847+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2018-12-22T06:37:29.341849+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:38:in `call_app'
2018-12-22T06:37:29.341850+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:20:in `block in call'
2018-12-22T06:37:29.341852+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2018-12-22T06:37:29.341854+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:26:in `tagged'
2018-12-22T06:37:29.341855+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:68:in `tagged'
2018-12-22T06:37:29.341857+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:20:in `call'
2018-12-22T06:37:29.341858+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2018-12-22T06:37:29.341925+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'
2018-12-22T06:37:29.341928+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/runtime.rb:17:in `call'
2018-12-22T06:37:29.341930+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.8/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
2018-12-22T06:37:29.341937+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/static.rb:84:in `call'
2018-12-22T06:37:29.341939+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/sendfile.rb:112:in `call'
2018-12-22T06:37:29.341941+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/engine.rb:514:in `call'
2018-12-22T06:37:29.341942+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.1.8/lib/rails/application.rb:144:in `call'
2018-12-22T06:37:29.341944+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/lock.rb:17:in `call'
2018-12-22T06:37:29.341945+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/content_length.rb:14:in `call'
2018-12-22T06:37:29.341947+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.5/lib/rack/handler/webrick.rb:60:in `service'
2018-12-22T06:37:29.341948+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2018-12-22T06:37:29.341950+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2018-12-22T06:37:29.341952+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2018-12-22T06:37:29.341953+00:00 app[web.1]:
After I add this line to production.rb
config.exceptions_app = self.routes
routes.rb
get '/404', to: 'errors#not_found'
get '/422', to: 'errors#unacceptable'
errors.controller.rb
class ErrorsController < ApplicationController
def not_found
render :status => 404
end
def unacceptable
render :status => 422
end
end
I am not sure how to solve this please help!
once checkout below links to configure database.yml,
pool: 5
timeout: 5000
https://gist.github.com/erichurst/961978
How to increase ActiveRecord connection timeout?
I've deployed my Rails app running Puma on Heroku. I am using the gem websockets-rails for live chat and notifications.
I've had some issues connecting to websockets (RuntimeError (eventmachine not initialized: evma_install_oneshot_timer):) initially but I fixed that by adding
Thread.new { EventMachine.run } unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive?
to a config/initializers/eventmachine.rb. Again, everything works fine locally when I run heroku local and doesn't timeout/become eventmachine not initialized after a few minutes.
However, every time I deploy/re-deploy on Heroku, WebSockets works fine for the first few minutes but fails afterwards. I get a WebSocket connection to 'wss://www.studbuds.com/websocket' failed: Error during WebSocket handshake: Unexpected response code: 500 error on the client-side and the stack trace
2016-01-20T17:59:12.672733+00:00 app[web.1]: RuntimeError (eventmachine not initialized: evma_install_oneshot_timer):
2016-01-20T17:59:12.672734+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:331:in `add_oneshot_timer'
2016-01-20T17:59:12.672735+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/eventmachine-1.0.8/lib/eventmachine.rb:331:in `add_timer'
2016-01-20T17:59:12.672735+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/eventmachine-1.0.8/lib/em/timers.rb:50:in `schedule'
2016-01-20T17:59:12.672736+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/eventmachine-1.0.8/lib/em/timers.rb:37:in `initialize'
2016-01-20T17:59:12.672736+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_adapters.rb:167:in `new'
2016-01-20T17:59:12.672737+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_adapters.rb:167:in `start_ping_timer'
2016-01-20T17:59:12.672738+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_adapters.rb:46:in `initialize'
2016-01-20T17:59:12.672739+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_adapters/web_socket.rb:10:in `initialize'
2016-01-20T17:59:12.672739+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_adapters.rb:14:in `new'
2016-01-20T17:59:12.672740+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_adapters.rb:14:in `establish_connection'
2016-01-20T17:59:12.672741+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_manager.rb:78:in `open_connection'
2016-01-20T17:59:12.672741+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/websocket-rails-0.7.0/lib/websocket_rails/connection_manager.rb:55:in `call'
2016-01-20T17:59:12.672742+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/mapper.rb:51:in `serve'
2016-01-20T17:59:12.672742+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb:43:in `block in serve'
2016-01-20T17:59:12.672743+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb:30:in `each'
2016-01-20T17:59:12.672743+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/journey/router.rb:30:in `serve'
2016-01-20T17:59:12.672744+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:819:in `call'
2016-01-20T17:59:12.672744+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.4/lib/warden/manager.rb:35:in `block in call'
2016-01-20T17:59:12.672745+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.4/lib/warden/manager.rb:34:in `catch'
2016-01-20T17:59:12.672745+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.4/lib/warden/manager.rb:34:in `call'
2016-01-20T17:59:12.672746+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
2016-01-20T17:59:12.672747+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in `call'
2016-01-20T17:59:12.672747+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
2016-01-20T17:59:12.672748+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2016-01-20T17:59:12.672748+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/flash.rb:260:in `call'
2016-01-20T17:59:12.672748+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
2016-01-20T17:59:12.672749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
2016-01-20T17:59:12.672749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2016-01-20T17:59:12.672749+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/query_cache.rb:36:in `call'
2016-01-20T17:59:12.672750+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
2016-01-20T17:59:12.672751+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2016-01-20T17:59:12.672751+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call'
2016-01-20T17:59:12.672751+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks'
2016-01-20T17:59:12.672752+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
2016-01-20T17:59:12.672752+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2016-01-20T17:59:12.672752+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2016-01-20T17:59:12.672753+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
2016-01-20T17:59:12.672753+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2016-01-20T17:59:12.672753+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2016-01-20T17:59:12.672757+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/rack/logger.rb:38:in `call_app'
2016-01-20T17:59:12.672757+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/rack/logger.rb:20:in `block in call'
2016-01-20T17:59:12.672758+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2016-01-20T17:59:12.672758+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged'
2016-01-20T17:59:12.672758+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged'
2016-01-20T17:59:12.672759+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/rack/logger.rb:20:in `call'
2016-01-20T17:59:12.672759+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/request_store-1.3.0/lib/request_store/middleware.rb:9:in `call'
2016-01-20T17:59:12.672760+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2016-01-20T17:59:12.672760+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2016-01-20T17:59:12.672761+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2016-01-20T17:59:12.672761+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2016-01-20T17:59:12.672762+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/static.rb:113:in `call'
2016-01-20T17:59:12.672762+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2016-01-20T17:59:12.672762+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2016-01-20T17:59:12.672763+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:518:in `call'
2016-01-20T17:59:12.672763+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:164:in `call'
2016-01-20T17:59:12.672764+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2016-01-20T17:59:12.672765+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/puma-2.15.3/lib/puma/server.rb:541:in `handle_request'
2016-01-20T17:59:12.672765+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/puma-2.15.3/lib/puma/server.rb:388:in `process_client'
2016-01-20T17:59:12.672766+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/puma-2.15.3/lib/puma/server.rb:270:in `block in run'
2016-01-20T17:59:12.672766+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/puma-2.15.3/lib/puma/thread_pool.rb:106:in `call'
2016-01-20T17:59:12.672766+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/puma-2.15.3/lib/puma/thread_pool.rb:106:in `block in spawn_thread'
If I restart the dynos, it works again but dies shortly after.
Note I'm use a Puma which is multi-threaded, so could it be that my application is not thread-safe?
I have a utility on ruby on rails that uploads files to public folder. And by providing the link to that file i can download that file.
It is working fine on local rails server.
I deployed my work to heroku. where uploading part works. but when i click to login button it simply gives error
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
on looking to heroku logs, i noticed it is a routing error.
Any one please let me know what i am missing. as i am really beginner with heroku.
Thanks regards,
Update
Here are the heroku logs
2014-08-12T12:44:02.705737+00:00 app[web.1]: Rendered internships/show.html.erb within layouts/application (23.2ms)
2014-08-12T12:44:14.260997+00:00 heroku[router]: at=info method=GET path="/resume/Saghir%20Resume1.docx" host=shielded-atoll-2450.herokuapp.com request_id=87d911ee-2bb3-40e7-923b-a8029f7ab6ff fwd="39.44.84.14" dyno=web.1 connect=2ms service=27ms status=404 bytes=1182
2014-08-12T12:44:14.253695+00:00 app[web.1]: Started GET "/resume/Saghir%20Resume1.docx" for 39.44.84.14 at 2014-08-12 12:44:14 +0000
2014-08-12T12:44:14.256004+00:00 app[web.1]:
2014-08-12T12:44:14.253706+00:00 app[web.1]: Started GET "/resume/Saghir%20Resume1.docx" for 39.44.84.14 at 2014-08-12 12:44:14 +0000
2014-08-12T12:44:14.256011+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-08-12T12:44:14.256016+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2014-08-12T12:44:14.256007+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/resume/Saghir%20Resume1.docx"):
2014-08-12T12:44:14.256009+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.5/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2014-08-12T12:44:14.256014+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/rack/logger.rb:20:in `block in call'
2014-08-12T12:44:14.256017+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/tagged_logging.rb:26:in `tagged'
2014-08-12T12:44:14.256012+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/rack/logger.rb:38:in `call_app'
2014-08-12T12:44:14.256056+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-08-12T12:44:14.256059+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-08-12T12:44:14.256054+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/application.rb:97:in `call'
2014-08-12T12:44:14.256022+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-08-12T12:44:14.256063+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-08-12T12:44:14.256019+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/tagged_logging.rb:68:in `tagged'
2014-08-12T12:44:14.256020+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/rack/logger.rb:20:in `call'
2014-08-12T12:44:14.256064+00:00 app[web.1]:
2014-08-12T12:44:14.256060+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2014-08-12T12:44:14.256078+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/rack/logger.rb:20:in `block in call'
2014-08-12T12:44:14.256066+00:00 app[web.1]:
2014-08-12T12:44:14.256057+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-08-12T12:44:14.256094+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/engine.rb:511:in `call'
2014-08-12T12:44:14.256023+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-08-12T12:44:14.256077+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/rack/logger.rb:38:in `call_app'
2014-08-12T12:44:14.256072+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/resume/Saghir%20Resume1.docx"):
2014-08-12T12:44:14.256074+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.5/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2014-08-12T12:44:14.256090+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2014-08-12T12:44:14.256080+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2014-08-12T12:44:14.256098+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-08-12T12:44:14.256091+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.5/lib/action_dispatch/middleware/static.rb:64:in `call'
2014-08-12T12:44:14.256025+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-08-12T12:44:14.256104+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-08-12T12:44:14.256027+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2014-08-12T12:44:14.256097+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-08-12T12:44:14.256085+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-08-12T12:44:14.256095+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.5/lib/rails/application.rb:97:in `call'
2014-08-12T12:44:14.256102+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-08-12T12:44:14.256083+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.5/lib/active_support/tagged_logging.rb:68:in `tagged'
Your link is to /resume/Saghir%20Resume1.docx (/resume/Saghir Resume1.docx) but you say its in the public folder -- is the upload directory /public/resume/file_name? And are you set for Rails to serve_static_assets?
As #CodeGnome pointed out, Heroku is an ephemeral filesystem so the entire approach is a bad idea -- typically you'd use Amazon S3 or a similar filestore for your uploaded files. Even if your routes are right, the file you uploaded can be on a different dyno because you're running more than one or because you've redeployed.
Heroku has something called the Ephemeral filesystem, so during the dyno’s lifetime its running processes can make use of it, but any file stored here will be discarded after the dyno has finished, so yes it does save the file, but after that it is deleted so it won't find it.
A very common approach is using paperclip and Amazon S3 for handling/storing the uploads, and those are pretty straightforward to install too. Here is a great article explaining how to do so: https://devcenter.heroku.com/articles/paperclip-s3
I am new to RoR and Heroku, i have uploded the app on github repo however am getting an error while running the app, on the browser. this is the screenshot of the error and the heroku log:-
Front end error message shows
"We're sorry, but something went wrong.
This error was automatically reported, sorry for the inconvenience."
2014-07-01T05:44:24.617831+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake.rb:172:in `new'
2014-07-01T05:44:24.617835+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake.rb:132:in `notify_or_ignore'
2014-07-01T05:44:24.617827+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/notice.rb:322:in `find_session_data'
2014-07-01T05:44:24.617833+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake.rb:172:in `build_notice_for'
2014-07-01T05:44:24.617818+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:273:in `session_exists?'
2014-07-01T05:44:24.617837+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/rails/middleware.rb:40:in `notify_airbrake'
2014-07-01T05:44:24.617821+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:107:in `exists?'
2014-07-01T05:44:24.617839+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/rails/middleware.rb:15:in `rescue in call'
2014-07-01T05:44:24.617843+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2014-07-01T05:44:24.617854+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2014-07-01T05:44:24.617856+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
2014-07-01T05:44:24.617849+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in `block in call'
2014-07-01T05:44:24.617852+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in `call'
2014-07-01T05:44:24.617858+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
2014-07-01T05:44:24.617890+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2014-07-01T05:44:24.617892+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
2014-07-01T05:44:24.617902+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/static.rb:63:in `call'
2014-07-01T05:44:24.617904+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
2014-07-01T05:44:24.617906+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
2014-07-01T05:44:24.617908+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
2014-07-01T05:44:24.617910+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
2014-07-01T05:44:24.617912+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
2014-07-01T05:44:24.617845+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/mi
ddleware/show_exceptions.rb:56:in `call'
2014-07-01T05:44:24.617915+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/user_informer.rb:12:in `call'
2014-07-01T05:44:24.617917+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/engine.rb:484:in `call'
2014-07-01T05:44:24.617841+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/rails/middleware.rb:12:in `call'
2014-07-01T05:44:24.617847+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in `call_app'
2014-07-01T05:44:24.617851+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.18/lib/active_support/tagged_logging.rb:22:in `tagged'
2014-07-01T05:44:24.617913+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/user_informer.rb:16:in `_call'
2014-07-01T05:44:24.617919+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/application.rb:231:in `call'
2014-07-01T05:44:24.617921+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-07-01T05:44:24.617922+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:576:in `process_client'
2014-07-01T05:44:24.617924+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670:in `worker_loop'
2014-07-01T05:44:24.617930+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
2014-07-01T05:44:24.617926+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
2014-07-01T05:44:24.617934+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `<main>'
2014-07-01T05:44:24.617928+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140:in `start'
2014-07-01T05:44:24.617931+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load'
2014-07-01T05:44:24.617936+00:00 app[web.1]:
2014-07-01T05:44:24.617938+00:00 app[web.1]:
2014-07-01T05:44:33.019295+00:00 heroku[router]: at=info method=GET path="/" host=goofycarpool.herokuapp.com request_id=51427406-bc26-48c4-9961-a27401d67249 fwd="122.174.120.48" dyno=web.1 connect=1ms service=80ms status=500 bytes=1778
2014-07-01T05:44:32.964192+00:00 app[web.1]: Started GET "/" for 122.174.120.48 at 2014-07-01 05:44:32 +0000
2014-07-01T05:44:33.018094+00:00 app[web.1]:
2014-07-01T05:44:33.018101+00:00 app[web.1]: ArgumentError (A secret is required to generate an integrity hash for cookie session data. Use config.secret_token = "some secret phrase of at least 30 characters"in config/initializers/secret_token.rb):
2014-07-01T05:44:33.018103+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:319:in `ensure_secret_secure'
2014-07-01T05:44:33.018105+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:284:in `initialize'
2014-07-01T05:44:33.018107+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:231:in `new'
2014-07-01T05:44:33.018108+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/cookies.rb:231:in `signed'
2014-07-01T05:44:33.018113+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/session/cookie_store.rb:48:in `unpacked_cookie_data'
2014-07-01T05:44:33.018110+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/session/cookie_store.rb:50:in `block in unpacked_cookie_data'
2014-07-01T05:44:33.018112+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/session/abstract_store.rb:57:in `stale_session_check!'
2014-07-01T05:44:33.018132+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/session/abstract_store.rb:53:in `block in extract_session_id'
2014-07-01T05:44:33.018134+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/session/abstract_store.rb:57:in `stale_session_check!'
2014-07-01T05:44:33.018129+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/cookie.rb:107:in `extract_session_id'
2014-07-01T05:44:33.018145+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:273:in `session_exists?'
2014-07-01T05:44:33.018139+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:43:in `load_session_id!'
2014-07-01T05:44:33.018136+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/session/abstract_store.rb:53:in `extract_session_id'
2014-07-01T05:44:33.018141+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:32:in `[]'
2014-07-01T05:44:33.018143+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:267:in `current_session_id'
2014-07-01T05:44:33.018147+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:107:in `exists?'
2014-07-01T05:44:33.018149+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:127:in `load_for_read!'
2014-07-01T05:44:33.018160+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake.rb:172:in `build_notice_for'
2014-07-01T05:44:33.018158+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake.rb:172:in `new'
2014-07-01T05:44:33.018162+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake.rb:132:in `notify_or_ignore'
2014-07-01T05:44:33.018154+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/notice.rb:322:in `find_session_data'
2014-07-01T05:44:33.018156+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/notice.rb:131:in `initialize'
2014-07-01T05:44:33.018164+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/rails/middleware.rb:40:in `notify_airbrake'
2014-07-01T05:44:33.018151+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:59:in `[]'
2014-07-01T05:44:33.018228+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in `block in call'
2014-07-01T05:44:33.018230+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.18/lib/active_support/tagged_logging.rb:22:in `tagged'
2014-07-01T05:44:33.018221+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2014-07-01T05:44:33.018223+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2014-07-01T05:44:33.018241+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.18/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2014-07-01T05:44:33.018214+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/rails/middleware.rb:15:in `rescue in call'
2014-07-01T05:44:33.018239+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
2014-07-01T05:44:33.018219+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/rails/middleware.rb:12:in `call'
2014-07-01T05:44:33.018243+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
2014-07-01T05:44:33.018255+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/static.rb:63:in `call'
2014-07-01T05:44:33.018226+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:32:in `call_app'
2014-07-01T05:44:33.018257+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
2014-07-01T05:44:33.018232+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/rack/logger.rb:16:in `call'
2014-07-01T05:44:33.018258+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
2014-07-01T05:44:33.018260+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
2014-07-01T05:44:33.018236+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
2014-07-01T05:44:33.018261+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
2014-07-01T05:44:33.018264+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/user_informer.rb:16:in `_call'
2014-07-01T05:44:33.018234+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2014-07-01T05:44:33.018270+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-07-01T05:44:33.018266+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/airbrake-4.0.0/lib/airbrake/user_informer.rb:12:in `call'
2014-07-01T05:44:33.018263+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
2014-07-01T05:44:33.018269+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/application.rb:231:in `call'
2014-07-01T05:44:33.018272+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:576:in `process_client'
2014-07-01T05:44:33.018267+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/railties-3.2.18/lib/rails/engine.rb:484:in `call'
2014-07-01T05:44:33.018280+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `<main>'
2014-07-01T05:44:33.018277+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
2014-07-01T05:44:33.018273+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:670:in `worker_loop'
2014-07-01T05:44:33.018283+00:00 app[web.1]:
2014-07-01T05:44:33.018279+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load'
2014-07-01T05:44:33.018276+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:140:in `start'
2014-07-01T05:44:33.018281+00:00 app[web.1]:
2014-07-01T05:44:33.018274+00:00 app[web.1]: vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
run
$ rake secret
and then paste the output string in config/initializers/secret_token.rb
MyAppNAME_GOES_HERE::Application.config.secret_key_base = 'e5d6fed054aadcb955c17d90ab0cae35b9921e3af7fa0f88ba2b8bcee6ab1b087e34c2081c867b42093f81197bd4272c49a2337fc7d31b6f892ae6ef57e842d7'
now commit & push all changes to heroku.
PS: Instead of harder-coded secret_key_base, it makes more sense from security prespective to set this a ENV var on heroku, like this:
$ heroku config:set SECRET_KEY_BASE=that_random_string_goes_here
for more details on how to do this, check this. But if you just getting starting started, you can learn how to do this later & this hard-coded will workout any problems
Never place the secret key in the config/initializers/secret_token.rb file directly.
It is a security threat always
Instead create an ENV variable as
MyAppNAME_GOES_HERE::Application.config.secret_key_base = ENV[SECRET_KEY]
and place the SECRET_KEY in heroku setting under Heroku login >> under_app >> setting >> reveal config vars
and finally restart your application
Any idea why this isn't working?
This is odd, because testing locally it works fine. I sign out, it redirects through Devise's sign_out process to my homepage. But on Heroku I get a page missing error.
The Heroku logs are a bit baffling:
2013-06-21T08:05:17.173706+00:00 app[web.1]: Started GET "/users/sign_out" for 115.87.109.249 at 2013-06-21 08:05:17 +0000
2013-06-21T08:05:17.173706+00:00 app[web.1]:
2013-06-21T0
8:05:17.176805+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_controller/metal.rb:246:in `block in action'
2013-06-21T08:05:17.176966+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
2013-06-21T08:05:17.176805+00:00 app[web.1]:
2013-06-21T08:05:17.176805+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_controller/metal.rb:203:in `dispatch'
2013-06-21T08:05:17.176966+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
2013-06-21T08:05:17.176966+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
2013-06-21T08:05:17.176966+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14:in `call'
2013-06-21T08:05:17.176805+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `call'
2013-06-21T08:05:17.176966+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
2013-06-21T08:05:17.176966+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
2013-06-21T08:05:17.176805+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `_run__434936903609672590__call__3559819517956854473__callbacks'
2013-06-21T08:05:17.176805+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:36:in `call'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-06-21T08:05:17.176805+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:45:in `process'
2013-06-21T08:05:17.176805+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2013-06-21T08:05:17.176966+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/flash.rb:242:in `call'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-06-21T08:05:17.178109+00:00 app[web.1]:
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-06-21T08:05:17.178109+00:00 app[web.1]:
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/cookies.rb:338:in `call'
2013-06-21T08:05:17.177151+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.3/lib/active_record/query_cache.rb:64:in `call'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.3/lib/rails/engine.rb:479:in `call'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.3/lib/rails/rack/logger.rb:26:in `call_app'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.3/lib/rails/rack/logger.rb:16:in `call'
2013-06-21T08:05:17.177608+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.3/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.3/lib/action_dispatch/middleware/static.rb:62:in `call'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.3/lib/rails/application.rb:220:in `call'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-3.2.3/lib/rails/rack/log_tailer.rb:14:in `call'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2013-06-21T08:05:17.177775+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
2013-06-21T08:05:17.178109+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
You should follow this wiki page
https://github.com/plataformatec/devise/wiki/How-To:-Add-sign_in,-sign_out,-and-sign_up-links-to-your-layout-template
I have found, you are trying to call /users/sign_out with GET method
2013-06-21T08:05:17.173706+00:00 app[web.1]: Started GET "/users/sign_out" for 115.87.109.249 at 2013-06-21 08:05:17 +0000
while devise create route for DELETE method .. have you created route for it?