Rails Heroku应用程序错误(Rails Heroku app errors)
我的项目在当地运作良好。 我将它部署到Heroku。 我有一些错误,应用程序无法运行。 我正在使用rails 4和postgresql。 无法理解为什么会发生这种情况。 在我看来,数据库没有创建。 我应该在我的database.yml中添加指定生产设置吗?
database.yml的
development: adapter: postgresql encoding: utf8 database: test_store_dev pool: 5 username: mike password: mike host: 127.0.0.1 test: adapter: postgresql encoding: utf8 database: test_store_test pool: 5 username: mike password: mike host: 127.0.0.1
从日志:
~/workspace/test_store$ heroku logs --tail 2014-02-13T13:14:47.731382+00:00 app[web.1]: 3: 2014-02-13T13:14:47.731535+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.731382+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.731972+00:00 app[web.1]: I, [2014-02-13T13:13:06.802166 #2] INFO -- : Started GET "/" for 46.53.195.24 at 2014-02-13 13:13:06 +0000 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call' 2014-02-13T13:14:47.731972+00:00 app[web.1]: I, [2014-02-13T13:13:06.807361 #2] INFO -- : Rendered shared/_search_form.html.erb (0.6ms) 2014-02-13T13:14:47.731972+00:00 app[web.1]: E, [2014-02-13T13:13:06.810210 #2] ERROR -- : PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.731972+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.731828+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-02-13T13:14:47.731972+00:00 app[web.1]: ^ 2014-02-13T13:14:47.731972+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft" 2014-02-13T13:14:47.732116+00:00 app[web.1]: I, [2014-02-13T13:13:06.813303 #2] INFO -- : Rendered categories/index.html.erb within layouts/application (6.7ms) 2014-02-13T13:14:47.731972+00:00 app[web.1]: I, [2014-02-13T13:13:06.805622 #2] INFO -- : Processing by CategoriesController#index as HTML 2014-02-13T13:14:47.732116+00:00 app[web.1]: F, [2014-02-13T13:13:06.819692 #2] FATAL -- : 2014-02-13T13:14:47.732116+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732116+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732116+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.732116+00:00 app[web.1]: 3: 2014-02-13T13:14:47.732116+00:00 app[web.1]: 4: <%= render :partial => '/shared/search_form' %> 2014-02-13T13:14:47.732116+00:00 app[web.1]: 5: 2014-02-13T13:14:47.732271+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.732116+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732116+00:00 app[web.1]: I, [2014-02-13T13:13:06.814571 #2] INFO -- : Completed 500 Internal Server Error in 9ms 2014-02-13T13:14:47.731683+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-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call' 2014-02-13T13:14:47.731683+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-02-13T13:14:47.732271+00:00 app[web.1]: app/views/categories/index.html.erb:6:in `_app_views_categories_index_html_erb___3515298162048279666_69853047486040' 2014-02-13T13:14:47.732271+00:00 app[web.1]: 2014-02-13T13:14:47.732271+00:00 app[web.1]: 2014-02-13T13:14:47.732271+00:00 app[web.1]: I, [2014-02-13T13:14:42.123367 #2] INFO -- : Started GET "/" for 46.53.195.24 at 2014-02-13 13:14:42 +0000 2014-02-13T13:14:47.732271+00:00 app[web.1]: 8: <h3> <%= link_to category.name, products_path(:category => category.slug) %> </h3> 2014-02-13T13:14:47.732271+00:00 app[web.1]: 7: <div class="col-md-4"> 2014-02-13T13:14:47.732429+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft" 2014-02-13T13:14:47.732429+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732429+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732598+00:00 app[web.1]: 3: 2014-02-13T13:14:47.732598+00:00 app[web.1]: 4: <%= render :partial => '/shared/search_form' %> 2014-02-13T13:14:47.732598+00:00 app[web.1]: 5: 2014-02-13T13:14:47.732598+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.732598+00:00 app[web.1]: 7: <div class="col-md-4"> 2014-02-13T13:14:47.732598+00:00 app[web.1]: 8: <h3> <%= link_to category.name, products_path(:category => category.slug) %> </h3> 2014-02-13T13:14:47.732429+00:00 app[web.1]: I, [2014-02-13T13:14:42.134755 #2] INFO -- : Rendered categories/index.html.erb within layouts/application (9.8ms) 2014-02-13T13:14:47.732743+00:00 app[web.1]: 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.723691 #2] INFO -- : Rendered shared/_search_form.html.erb (0.6ms) 2014-02-13T13:14:47.732743+00:00 app[web.1]: E, [2014-02-13T13:14:47.728029 #2] ERROR -- : PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732743+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732598+00:00 app[web.1]: app/views/categories/index.html.erb:6:in `_app_views_categories_index_html_erb___3515298162048279666_69853047486040' 2014-02-13T13:14:47.732598+00:00 app[web.1]: 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.729251 #2] INFO -- : Completed 500 Internal Server Error in 11ms 2014-02-13T13:14:47.732886+00:00 app[web.1]: F, [2014-02-13T13:14:47.731100 #2] FATAL -- : 2014-02-13T13:14:47.732886+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732886+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732886+00:00 app[web.1]: 3: 2014-02-13T13:14:47.732743+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732886+00:00 app[web.1]: 5: 2014-02-13T13:14:47.732886+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.732886+00:00 app[web.1]: 7: <div class="col-md-4"> 2014-02-13T13:14:47.731828+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-02-13T13:14:47.733034+00:00 app[web.1]: 9: 2014-02-13T13:14:47.733034+00:00 app[web.1]: 8: <h3> <%= link_to category.name, products_path(:category => category.slug) %> </h3> 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call' 2014-02-13T13:14:47.733034+00:00 app[web.1]: 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call' 2014-02-13T13:14:47.732886+00:00 app[web.1]: 4: <%= render :partial => '/shared/search_form' %> 2014-02-13T13:14:47.733034+00:00 app[web.1]: app/views/categories/index.html.erb:6:in `_app_views_categories_index_html_erb___3515298162048279666_69853047486040' 2014-02-13T13:14:47.733034+00:00 app[web.1]: 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run' 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service' 2014-02-13T13:14:47.731972+00:00 app[web.1]: 2014-02-13T13:14:47.731972+00:00 app[web.1]: 2014-02-13T13:14:47.731972+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-02-13T13:14:47.732271+00:00 app[web.1]: I, [2014-02-13T13:14:42.124293 #2] INFO -- : Processing by CategoriesController#index as HTML 2014-02-13T13:14:47.732271+00:00 app[web.1]: I, [2014-02-13T13:14:42.127769 #2] INFO -- : Rendered shared/_search_form.html.erb (0.5ms) 2014-02-13T13:14:47.732271+00:00 app[web.1]: 9: 2014-02-13T13:14:47.732429+00:00 app[web.1]: I, [2014-02-13T13:14:42.134928 #2] INFO -- : Completed 500 Internal Server Error in 11ms 2014-02-13T13:14:47.732429+00:00 app[web.1]: F, [2014-02-13T13:14:42.136566 #2] FATAL -- : 2014-02-13T13:14:47.732429+00:00 app[web.1]: E, [2014-02-13T13:14:42.131964 #2] ERROR -- : PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732429+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732429+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732429+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732598+00:00 app[web.1]: 9: 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.715526 #2] INFO -- : Started GET "/" for 46.53.195.24 at 2014-02-13 13:14:47 +0000 2014-02-13T13:14:47.732598+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.732743+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft" 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.729098 #2] INFO -- : Rendered categories/index.html.erb within layouts/application (6.1ms) 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.717991 #2] INFO -- : Processing by CategoriesController#index as HTML 2014-02-13T13:14:47.732886+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.732886+00:00 app[web.1]: ^ 2014-02-13T13:14:42.190691+00:00 heroku[router]: at=info method=GET path=/ host=thawing-mesa-8086.herokuapp.com request_id=fa0aa0ee-7720-49c0-a2c4-271131bf6688 fwd="46.53.195.24" dyno=web.1 connect=0ms service=75ms status=500 bytes=1266
My project works well locally. I deployed it to Heroku. I've got some errors and app couldn't run there. I'm using rails 4 with postgresql. Can't understand why this is happens. It seems to me that database wasn't created. Should I add specify production settings on my database.yml?
database.yml
development: adapter: postgresql encoding: utf8 database: test_store_dev pool: 5 username: mike password: mike host: 127.0.0.1 test: adapter: postgresql encoding: utf8 database: test_store_test pool: 5 username: mike password: mike host: 127.0.0.1
From log:
~/workspace/test_store$ heroku logs --tail 2014-02-13T13:14:47.731382+00:00 app[web.1]: 3: 2014-02-13T13:14:47.731535+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.731382+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.731972+00:00 app[web.1]: I, [2014-02-13T13:13:06.802166 #2] INFO -- : Started GET "/" for 46.53.195.24 at 2014-02-13 13:13:06 +0000 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:97:in `call' 2014-02-13T13:14:47.731972+00:00 app[web.1]: I, [2014-02-13T13:13:06.807361 #2] INFO -- : Rendered shared/_search_form.html.erb (0.6ms) 2014-02-13T13:14:47.731972+00:00 app[web.1]: E, [2014-02-13T13:13:06.810210 #2] ERROR -- : PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.731972+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.731828+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-02-13T13:14:47.731972+00:00 app[web.1]: ^ 2014-02-13T13:14:47.731972+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft" 2014-02-13T13:14:47.732116+00:00 app[web.1]: I, [2014-02-13T13:13:06.813303 #2] INFO -- : Rendered categories/index.html.erb within layouts/application (6.7ms) 2014-02-13T13:14:47.731972+00:00 app[web.1]: I, [2014-02-13T13:13:06.805622 #2] INFO -- : Processing by CategoriesController#index as HTML 2014-02-13T13:14:47.732116+00:00 app[web.1]: F, [2014-02-13T13:13:06.819692 #2] FATAL -- : 2014-02-13T13:14:47.732116+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732116+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732116+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.732116+00:00 app[web.1]: 3: 2014-02-13T13:14:47.732116+00:00 app[web.1]: 4: <%= render :partial => '/shared/search_form' %> 2014-02-13T13:14:47.732116+00:00 app[web.1]: 5: 2014-02-13T13:14:47.732271+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.732116+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732116+00:00 app[web.1]: I, [2014-02-13T13:13:06.814571 #2] INFO -- : Completed 500 Internal Server Error in 9ms 2014-02-13T13:14:47.731683+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-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call' 2014-02-13T13:14:47.731683+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-02-13T13:14:47.732271+00:00 app[web.1]: app/views/categories/index.html.erb:6:in `_app_views_categories_index_html_erb___3515298162048279666_69853047486040' 2014-02-13T13:14:47.732271+00:00 app[web.1]: 2014-02-13T13:14:47.732271+00:00 app[web.1]: 2014-02-13T13:14:47.732271+00:00 app[web.1]: I, [2014-02-13T13:14:42.123367 #2] INFO -- : Started GET "/" for 46.53.195.24 at 2014-02-13 13:14:42 +0000 2014-02-13T13:14:47.732271+00:00 app[web.1]: 8: <h3> <%= link_to category.name, products_path(:category => category.slug) %> </h3> 2014-02-13T13:14:47.732271+00:00 app[web.1]: 7: <div class="col-md-4"> 2014-02-13T13:14:47.732429+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft" 2014-02-13T13:14:47.732429+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732429+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732598+00:00 app[web.1]: 3: 2014-02-13T13:14:47.732598+00:00 app[web.1]: 4: <%= render :partial => '/shared/search_form' %> 2014-02-13T13:14:47.732598+00:00 app[web.1]: 5: 2014-02-13T13:14:47.732598+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.732598+00:00 app[web.1]: 7: <div class="col-md-4"> 2014-02-13T13:14:47.732598+00:00 app[web.1]: 8: <h3> <%= link_to category.name, products_path(:category => category.slug) %> </h3> 2014-02-13T13:14:47.732429+00:00 app[web.1]: I, [2014-02-13T13:14:42.134755 #2] INFO -- : Rendered categories/index.html.erb within layouts/application (9.8ms) 2014-02-13T13:14:47.732743+00:00 app[web.1]: 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.723691 #2] INFO -- : Rendered shared/_search_form.html.erb (0.6ms) 2014-02-13T13:14:47.732743+00:00 app[web.1]: E, [2014-02-13T13:14:47.728029 #2] ERROR -- : PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732743+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732598+00:00 app[web.1]: app/views/categories/index.html.erb:6:in `_app_views_categories_index_html_erb___3515298162048279666_69853047486040' 2014-02-13T13:14:47.732598+00:00 app[web.1]: 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.729251 #2] INFO -- : Completed 500 Internal Server Error in 11ms 2014-02-13T13:14:47.732886+00:00 app[web.1]: F, [2014-02-13T13:14:47.731100 #2] FATAL -- : 2014-02-13T13:14:47.732886+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732886+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732886+00:00 app[web.1]: 3: 2014-02-13T13:14:47.732743+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732886+00:00 app[web.1]: 5: 2014-02-13T13:14:47.732886+00:00 app[web.1]: 6: <% Category.roots.each do |category| %> 2014-02-13T13:14:47.732886+00:00 app[web.1]: 7: <div class="col-md-4"> 2014-02-13T13:14:47.731828+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-02-13T13:14:47.733034+00:00 app[web.1]: 9: 2014-02-13T13:14:47.733034+00:00 app[web.1]: 8: <h3> <%= link_to category.name, products_path(:category => category.slug) %> </h3> 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call' 2014-02-13T13:14:47.733034+00:00 app[web.1]: 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call' 2014-02-13T13:14:47.732886+00:00 app[web.1]: 4: <%= render :partial => '/shared/search_form' %> 2014-02-13T13:14:47.733034+00:00 app[web.1]: app/views/categories/index.html.erb:6:in `_app_views_categories_index_html_erb___3515298162048279666_69853047486040' 2014-02-13T13:14:47.733034+00:00 app[web.1]: 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run' 2014-02-13T13:14:47.731828+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service' 2014-02-13T13:14:47.731972+00:00 app[web.1]: 2014-02-13T13:14:47.731972+00:00 app[web.1]: 2014-02-13T13:14:47.731972+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-02-13T13:14:47.732271+00:00 app[web.1]: I, [2014-02-13T13:14:42.124293 #2] INFO -- : Processing by CategoriesController#index as HTML 2014-02-13T13:14:47.732271+00:00 app[web.1]: I, [2014-02-13T13:14:42.127769 #2] INFO -- : Rendered shared/_search_form.html.erb (0.5ms) 2014-02-13T13:14:47.732271+00:00 app[web.1]: 9: 2014-02-13T13:14:47.732429+00:00 app[web.1]: I, [2014-02-13T13:14:42.134928 #2] INFO -- : Completed 500 Internal Server Error in 11ms 2014-02-13T13:14:47.732429+00:00 app[web.1]: F, [2014-02-13T13:14:42.136566 #2] FATAL -- : 2014-02-13T13:14:47.732429+00:00 app[web.1]: E, [2014-02-13T13:14:42.131964 #2] ERROR -- : PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732429+00:00 app[web.1]: LINE 1: SELECT "categories".* FROM "categories" WHERE "categories".... 2014-02-13T13:14:47.732429+00:00 app[web.1]: ^ 2014-02-13T13:14:47.732429+00:00 app[web.1]: ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "categories" does not exist 2014-02-13T13:14:47.732598+00:00 app[web.1]: 9: 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.715526 #2] INFO -- : Started GET "/" for 46.53.195.24 at 2014-02-13 13:14:47 +0000 2014-02-13T13:14:47.732598+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.732743+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft" 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.729098 #2] INFO -- : Rendered categories/index.html.erb within layouts/application (6.1ms) 2014-02-13T13:14:47.732743+00:00 app[web.1]: I, [2014-02-13T13:14:47.717991 #2] INFO -- : Processing by CategoriesController#index as HTML 2014-02-13T13:14:47.732886+00:00 app[web.1]: : SELECT "categories".* FROM "categories" WHERE "categories"."parent_id" IS NULL ORDER BY "categories"."lft"): 2014-02-13T13:14:47.732886+00:00 app[web.1]: ^ 2014-02-13T13:14:42.190691+00:00 heroku[router]: at=info method=GET path=/ host=thawing-mesa-8086.herokuapp.com request_id=fa0aa0ee-7720-49c0-a2c4-271131bf6688 fwd="46.53.195.24" dyno=web.1 connect=0ms service=75ms status=500 bytes=1266
原文:https://stackoverflow.com/questions/21755977
最满意答案
1)是的,你不需要在应用程序中有一个生产apk,你可以上传你的apk在阿尔法进行一些测试然后你可以选择apk并将其移动到测试版,然后在市场上公开。 它还支持Staged rollouts。
请按照本指南管理您的应用测试组。 ( Beta测试和分阶段推出 )
2)在Google Play开发者控制台中无法做到这一点。 这必须在清单中使用:
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true"/>
您还可以添加更多必需的功能。 当您将apk上传到Google Play时,您可以查看有多少设备对您的应用有效或被排除。 然后,只有符合您要求的设备才能在商店中看到该应用程序。
祝你好运
1) Yes you don't need to have a production apk in the app, you can upload your apk in alpha for some testing then you can select the apk and move it to beta and then make it public on market. It also supports Staged rollouts.
Follow this guide to manage your app testing groups. (Beta-testing and staged rollouts)
2) No this can't be done in Google play developer console. This has to be done in the manifest using this:
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true"/>
more information here. (support-screens) and here (uses-feature)
You can also add more required features. And when you upload the apk to google play , you can check how many devices are valid for your app, or excluded. Then only devices that meat your requirements can see the application in the store.
Good Luck
相关问答
更多-
如何防止从谷歌Play商店更新Android应用程序?(How to prevent android app from updating from the google play store?)[2023-03-04]
不幸的是,我认为没有办法检测Play商店何时尝试更新您的应用,除非您有第二个应用监听此事件。 即使你有办法检测到这一点,我认为你不能取消更新。 在第一个应用程序更新的过程中,您可能会将您正在进行的工作转移到第二个应用程序。 但是,我不需要说这听起来像是一个非常冒险的解决方案。 您应该专注于保存您的状态,并在应用程序更新和启动后继续离开。 Unfortunately, I don't think there is a way to detect when the Play Store attempts to ... -
将其更改为开发人员控制台中的所有国家 Change it to all countries in developer console.
-
更新 Beta测试仅适用于推荐人广播。 我同时实现了installreferrer API和广播,因此引用来自广播而不是API。 使用Google Play提供的Beta测试如下: 提交beta test APK文件 将您的帐户添加到测试人员 使用引荐来源打开您APP的详细信息页面网址。 根据类似的线程 ,url可以是这样的: https://play.google.com/store/apps/details?id=com.mypackage&referrer=utm_source%3Dmobisoc%2 ...
-
你的config.xml有id和android-packageName ,这正是你正在寻找的。 docs: https : //cordova.apache.org/docs/en/latest/config_ref/index.html You got id and android-packageName in your config.xml which is exactly what you are looking for. docs: https://cordova.apache.org/docs/e ...
-
可能是您的应用程序是在Android Studio中开发的。 在Android Studio中,版本名称和版本代码添加在build.gadle (Module App)文件中,而不是AndroidMenifest.xml 您必须在build.gradle中添加版本详细信息,如下所示: defaultConfig { applicationId "com.augmedix.www.animatevoice" minSdkVersion 15 targetSdkVersion 21 ...
-
在Google Play商店购买自己的应用是否需要付费?(Do I get charged to purchase my own app in Google Play Store?)[2022-06-10]
与技术支持@ Google聊天后。 它似乎是不可能的,开发人员/测试必须侧载或支付应用程序才能从Play商店进行测试。 谷歌不支持Apple App Store等“app promo codes”,直到现在还没有支持临时制作应用程序。 After chatting with tech support @ Google. It appears it is not possible and developers/test must either side-load or pay for the app in o ... -
1)是的,你不需要在应用程序中有一个生产apk,你可以上传你的apk在阿尔法进行一些测试然后你可以选择apk并将其移动到测试版,然后在市场上公开。 它还支持Staged rollouts。 请按照本指南管理您的应用测试组。 ( Beta测试和分阶段推出 ) 2)在Google Play开发者控制台中无法做到这一点。 这必须在清单中使用:
在Play商店中发布apk后,Google地图会显示灰色图块(Google Maps is showing grey tiles after publishing the apk in Play Store)[2022-05-18]
发布应用程序的人是否已将APK与其他密钥库一起辞职? Did the person publishing the app resign the APK with some other keystore?在未在Google Play商店中发布的应用上使用Adcolony(Use Adcolony on app that isn't publish on Google Play Store)[2022-11-08]
AdColony视频只能用于iTunes,Google Play或亚马逊商店发布的应用。 AdColony video can only be used in apps that are published on the iTunes, Google Play or Amazon stores.Google Play发布 - 如何加快新版应用的发布速度(Google play publishing - how to speed up publishing of new app releases)[2022-05-23]
是的,这是正常的,不,你不能加快速度。 这只是在所有Google服务器上传播新信息所需的时间。 Yes, it's normal, and no, you can't speed it up. It's just the time it takes to propagate the new information across all of Google's servers.相关文章
更多- Rails 风格指导
- Rails常用插件
- 使用Git 管理heroku的项目(windows)
- Rails设置环境变量
- rails 单元测试
- Rails中的路由功能是如何对应的?
- 全文检索(SOLR)前端应用浅析续 Rails前端分析
- rails model的一点疑惑。。。。。
- 配置sunspot tomcat结合sunspot_rails
- Rails4 已经移出了params可以解析xml的功能,拿rails4做微信API的童鞋们注意了
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)