1

我正在尝试使用我的应用程序打开 heroku,但我正在查看日志并看到有关我的用户数据库的此错误?我尝试运行heroku run rake db:migrate并重新启动 heroku 和其他东西,但它似乎不起作用。我没有不知道这些线是什么意思。希望有人能帮助我吗?

 => Booting WEBrick
 => Rails 3.2.13 application starting in production on http://0.0.0.0:56009
 at=info method=GET path=/ host=upkeepin.herokuapp.com fwd="76.89.238.178" dyno=web.1 connect=20ms service=1539ms status=500 bytes=643
 ActiveRecord::StatementInvalid (PG::Error: ERROR:  relation "users" does not exist
 ):

 LINE 5:              WHERE a.attrelid = '"users"'::regclass
                      pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
              WHERE a.attrelid = '"users"'::regclass
                                         ^
   vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query'
                AND a.attnum > 0 AND NOT a.attisdropped
   vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/model_schema.rb:228:in `columns'
 :             SELECT a.attname, format_type(a.atttypid, a.atttypmod),
   vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
   vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1161:in `exec_no_cache'
               FROM pg_attribute a LEFT JOIN pg_attrdef d
   vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_re

谢谢

编辑:

按照下面的说明,我现在得到这个,运行后heroku logs

     10:   <%= csrf_meta_tags %>
   app/views/layouts/application.html.erb:12:in `_app_views_layouts_application_html_erb__3270629977905203478_70215431754220'

   Rendered devise/shared/_links.erb (44.9ms)
     11:   
     12:   <%= stylesheet_link_tag 'gmaps4rails' %>
     13:   <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
     15: <body>
   Rendered devise/sessions/new.html.erb within layouts/application (58.1ms)
 Completed 500 Internal Server Error in 179ms

 ActionView::Template::Error (gmaps4rails.css isn't precompiled):
     9:   <%= javascript_include_tag "application" %>

     14: </head>
4

2 回答 2

4

做这个

$ git push heroku
$ heroku pg:reset SHARED_DATABASE --confirm <name-heroku-gave-to-your-app>
$ heroku run rake db:migrate
$ heroku run rake db:populate

然后试试这个:

$ heroku restart
于 2013-07-04T19:16:16.163 回答
1

错误来自无法预编译我的 gmaps4rails,答案在我的另一篇文章中:

rails heroku 给我我们很抱歉出现错误错误,gmaps4rails.css 未编译

于 2013-07-05T00:28:19.007 回答