ruby - Deploying to Heroku, Rails app -


i trying deploy rails app heroku. app uploaded not run reason. when type

heroku run rake db:migrate

i error saying

activerecord::connectiontimeouterror: not obtain database connection within 5.000 seconds (waited 5.000 seconds)

i using puma server , post of files might cause problem... please ask might cause error!

config/database.ymi

  production:   adapter:  postgresql   host:     localhost   encoding: unicode   database: fastorder_production   pool:     5   username: <%= env['fastorder_database_user'] %>   password: <%= env['fastorder_database_password'] %>   template: template0   url:  <%= env["database_url"] %>   pool: env['rails_max_threads'] 

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   # worker specific setup 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 

you should create db first:

heroku run rake db:create 

also, check heroku doc db connections: https://devcenter.heroku.com/articles/concurrency-and-database-connections


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -