ruby-on-rails - 在heroku 上重命名了Ruby on Rails 应用程序,现在它不起作用

标签 ruby-on-rails ruby-on-rails-3 heroku

我启动了我的应用程序,填充了数据库并访问了它几次,没有出现任何问题。但我只是通过登录我的 heroku 帐户并访问应用程序设置来更改应用程序的名称。现在我的应用程序出现故障。

后来我阅读了如何更改应用程序名称的指南,最终结果是相同的。我实际上只是更改了名称,但现在不起作用了。有人可以帮我解决这个问题吗?我还删除了指向heroku的远程别名,并将其替换为正确的地址。

感谢您的帮助

Heroku Logs(我会尝试进一步清理它)

    ←[36m2013-04-17T20:27:29.659316+00:00 app[web.1]:←[0m Redirected to http://costrecovery-post.herokuapp.com/
    ←[36m2013-04-17T20:27:29.659316+00:00 app[web.1]:←[0m Completed 302 Found in 4ms
    (ActiveRecord: 1.7ms)
    ←[36m2013-04-17T20:27:29.750709+00:00 app[web.1]:←[0m Started GET "/" for 74.143.68.203 at 2013-04-1720:27:29 +0000
    ←[36m2013-04-17T20:27:29.753863+00:00 app[web.1]:←[0m Processing by IncidentsController#index as HTML
    ←[36m2013-04-17T20:27:29.962842+00:00 app[web.1]:←[0m   Rendered incidents/index.html.erb within layouts/application (15.5ms)
    ←[36m2013-04-17T20:27:29.963111+00:00 app[web.1]:←[0m Completed 500 Internal Server Error in 207ms
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m ActionView::Template::Error (PG::Error: ERROR:  relation "users" does not exist at character 24
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m : SELECT  "users".* FROM "users"  WHERE "users"."id" = $1 LIMIT 1):
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m     26:   <td><%= incident.location %></td>
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m     27:   <td><b><%= incident.status %></b> <% if current_user.admin == "yes" %><%= link_to "change", changestatus_incident_path(incident) %><% end %></td>
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m     28:   <% if current_us
er.admin == "yes" %>
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m     29:   <td><%=     User.find(incident.user_id).profile.name %> (<%= User.find(incident.user_id).profile.department %>)</td>
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m     30:   <% end %>
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m     31:     <td><%= link_t
o 'View Time Sheet', incident_timesheet_path(incident) %></td>
    ←[36m2013-04-17T20:27:29.966640+00:00 app[web.1]:←[0m     32:   <td><%= link_to'Delete Incident', incident, :confirm => 'Are you sure?', :method => :delete %><
/td>
    ←[36m2013-04-17T20:27:29.966901+00:00 app[web.1]:←[0m   app/views/incidents/inde
x.html.erb:29:in `block in _app_views_incidents_index_html_erb___137155814596393
6561_33092660'
    ←[36m2013-04-17T20:27:29.966901+00:00 app[web.1]:←[0m   app/views/incidents/inde
x.html.erb:22:in `each'
    ←[36m2013-04-17T20:27:29.966901+00:00 app[web.1]:←[0m   app/views/incidents/inde
x.html.erb:22:in `_app_views_incidents_index_html_erb___1371558145963936561_3309
2660'
    ←[36m2013-04-17T20:27:29.966901+00:00 app[web.1]:←[0m   app/controllers/incident
s_controller.rb:22:in `index'
    ←[36m2013-04-17T20:27:29.966901+00:00 app[web.1]:←[0m
    ←[36m2013-04-17T20:27:29.966901+00:00 app[web.1]:←[0m
    ←[33m2013-04-17T20:27:29.977182+00:00 heroku[router]:←[0m at=info method=GET pat
h=/ host=costrecovery-post.herokuapp.com fwd="74.143.68.203" dyno=web.1 connect=
5ms service=246ms status=500 bytes=643

最佳答案

从命令行尝试这个:

$ heroku apps:rename newname
-> http://newname.heroku.com/ | <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="52353b26123a37203d39277c313d3f" rel="noreferrer noopener nofollow">[email protected]</a>:newname.git
-> Git remote heroku updated

关于ruby-on-rails - 在heroku 上重命名了Ruby on Rails 应用程序,现在它不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16069537/

相关文章:

ruby-on-rails - 仅在 Controller 中搭建一部分方法

ruby-on-rails-3 - Rails 3 设计手动更改密码

postgresql - heroku pgbackups :restore: Invalid dump format

ruby-on-rails - Ruby on Rails 帮助程序缓存评估值

ruby-on-rails - 从字符串中捕获字符

ruby-on-rails - 在Rails 5中,如何访问模型或助手中的cookies方法?

ruby-on-rails - 在安全 (https) 上运行 rails 并重定向非安全 (http) 请求以通过 webricks 确保安全

python - 在 Heroku 上安装 PyICU

node.js - 使用 Node 和 Heroku 进行负载平衡

ruby-on-rails - 我应该担心关于 Ruby 1.8.7 的 RVM 警告吗?