1

所以我花了大约一个星期的时间在一个新的应用程序上,并且刚刚受到打击,我在部署到 Heroku 时似乎遇到了应用程序错误。我已向 Heroku 技术支持发送了一条消息,但它们似乎已被积压。

日志中有明显的错误,但是我不确定如何解决它们,因为我对 Rails 很陌生。

更新 1:rorra 的新 gemfile 内容帮助修复了最初的错误!(我的 gemfile 格式不正确)

Update2:现在收到以下消息:我们很抱歉,但出了点问题。

New Heroku logs:


[StartupBlog]$heroku logs
2013-03-01T00:41:47+00:00 heroku[web.1]: State changed from starting to up
2013-03-01T00:41:48+00:00 app[web.1]: Started GET "/" for 174.95.207.136 at 2013-03-01 00:41:48 +0000
2013-03-01T00:41:48+00:00 app[web.1]: Processing by PagesController#home as HTML
2013-03-01T00:41:49+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (336.9ms)
2013-03-01T00:41:49+00:00 app[web.1]:   Rendered partials/_header.html.erb (302.2ms)
2013-03-01T00:41:49+00:00 app[web.1]: Completed 500 Internal Server Error in 671ms
2013-03-01T00:41:49+00:00 app[web.1]: 
2013-03-01T00:41:49+00:00 app[web.1]: ActionView::Template::Error (logo.png isn't precompiled):
2013-03-01T00:41:49+00:00 app[web.1]:     20: 
2013-03-01T00:41:49+00:00 app[web.1]:     21: <div class="navbar navbar-inverse navbar-static-top">
2013-03-01T00:41:49+00:00 app[web.1]:     22:   <div class="navbar-inner">
2013-03-01T00:41:49+00:00 app[web.1]:     23:     <a class="brand"><%=link_to logo, root_path %></a>
2013-03-01T00:41:49+00:00 app[web.1]:     24:     <ul class="nav pull-right">
2013-03-01T00:41:49+00:00 app[web.1]:     25:       <li class="home"><%= link_to "Home", root_path %></li>
2013-03-01T00:41:49+00:00 app[web.1]:     26:       <li><%= link_to "About", about_path %></li>
2013-03-01T00:41:49+00:00 app[web.1]:   app/helpers/application_helper.rb:14:in `logo'
2013-03-01T00:41:49+00:00 app[web.1]:   app/views/partials/_header.html.erb:23:in `_app_views_partials__header_html_erb___985491214305097811_33520600'
2013-03-01T00:41:49+00:00 app[web.1]:   app/views/pages/home.html.erb:1:in `_app_views_pages_home_html_erb__2767656240117324842_33999760'
2013-03-01T00:41:49+00:00 app[web.1]: 
2013-03-01T00:41:49+00:00 app[web.1]: 
2013-03-01T00:41:49+00:00 heroku[router]: at=info method=GET path=/ host=startupblog.herokuapp.com fwd="174.95.207.136" dyno=web.1 queue=0 wait=0ms connect=6ms service=1730ms status=500 bytes=643
2013-03-01T00:41:52+00:00 app[web.1]: Started GET "/" for 174.95.207.136 at 2013-03-01 00:41:52 +0000
2013-03-01T00:41:52+00:00 app[web.1]: Processing by PagesController#home as HTML
2013-03-01T00:41:52+00:00 app[web.1]:   Rendered partials/_header.html.erb (1.0ms)
2013-03-01T00:41:52+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (7.0ms)
2013-03-01T00:41:52+00:00 app[web.1]: Completed 500 Internal Server Error in 9ms
2013-03-01T00:41:52+00:00 app[web.1]: 
2013-03-01T00:41:52+00:00 app[web.1]: ActionView::Template::Error (logo.png isn't precompiled):
2013-03-01T00:41:52+00:00 app[web.1]:     20: 
2013-03-01T00:41:52+00:00 app[web.1]:     22:   <div class="navbar-inner">
2013-03-01T00:41:52+00:00 app[web.1]:     23:     <a class="brand"><%=link_to logo, root_path %></a>
2013-03-01T00:41:52+00:00 app[web.1]:   app/helpers/application_helper.rb:14:in `logo'
2013-03-01T00:41:52+00:00 app[web.1]:   app/views/partials/_header.html.erb:23:in `_app_views_partials__header_html_erb___985491214305097811_33520600'
2013-03-01T00:41:52+00:00 app[web.1]:   app/views/pages/home.html.erb:1:in `_app_views_pages_home_html_erb__2767656240117324842_33999760'
2013-03-01T00:41:52+00:00 app[web.1]:     21: <div class="navbar navbar-inverse navbar-static-top">
2013-03-01T00:41:52+00:00 app[web.1]:     26:       <li><%= link_to "About", about_path %></li>
2013-03-01T00:41:52+00:00 app[web.1]:     24:     <ul class="nav pull-right">
2013-03-01T00:41:52+00:00 app[web.1]: 
2013-03-01T00:41:52+00:00 app[web.1]: 
2013-03-01T00:41:52+00:00 app[web.1]:     25:       <li class="home"><%= link_to "Home", root_path %></li>
2013-03-01T00:41:52+00:00 heroku[router]: at=info method=GET path=/ host=startupblog.herokuapp.com fwd="174.95.207.136" dyno=web.1 queue=0 wait=6ms connect=27ms service=119ms status=500 bytes=643
2013-03-01T00:41:55+00:00 app[web.1]: Started GET "/" for 174.95.207.136 at 2013-03-01 00:41:55 +0000
2013-03-01T00:41:55+00:00 app[web.1]: Processing by PagesController#home as HTML
2013-03-01T00:41:55+00:00 app[web.1]:   Rendered partials/_header.html.erb (0.8ms)
2013-03-01T00:41:55+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (1.1ms)
2013-03-01T00:41:55+00:00 app[web.1]: Completed 500 Internal Server Error in 5ms
2013-03-01T00:41:55+00:00 app[web.1]: ActionView::Template::Error (logo.png isn't precompiled):
2013-03-01T00:41:55+00:00 app[web.1]:     20: 
2013-03-01T00:41:55+00:00 app[web.1]:     22:   <div class="navbar-inner">
2013-03-01T00:41:55+00:00 app[web.1]: 
2013-03-01T00:41:55+00:00 app[web.1]:     21: <div class="navbar navbar-inverse navbar-static-top">
2013-03-01T00:41:55+00:00 app[web.1]:     23:     <a class="brand"><%=link_to logo, root_path %></a>
2013-03-01T00:41:55+00:00 app[web.1]:     25:       <li class="home"><%= link_to "Home", root_path %></li>
2013-03-01T00:41:55+00:00 app[web.1]:     24:     <ul class="nav pull-right">
2013-03-01T00:41:55+00:00 app[web.1]:     26:       <li><%= link_to "About", about_path %></li>
2013-03-01T00:41:55+00:00 app[web.1]:   app/helpers/application_helper.rb:14:in `logo'
2013-03-01T00:41:55+00:00 app[web.1]:   app/views/partials/_header.html.erb:23:in `_app_views_partials__header_html_erb___985491214305097811_33520600'
2013-03-01T00:41:55+00:00 app[web.1]:   app/views/pages/home.html.erb:1:in `_app_views_pages_home_html_erb__2767656240117324842_33999760'
2013-03-01T00:41:55+00:00 app[web.1]: 
2013-03-01T00:41:55+00:00 app[web.1]: 
2013-03-01T00:41:55+00:00 heroku[router]: at=info method=GET path=/ host=startupblog.herokuapp.com fwd="174.95.207.136" dyno=web.1 queue=0 wait=0ms connect=5ms service=25ms status=500 bytes=643
2013-03-01T00:41:59+00:00 app[web.1]: Started GET "/" for 174.95.207.136 at 2013-03-01 00:41:59 +0000
2013-03-01T00:41:59+00:00 app[web.1]:   Rendered partials/_header.html.erb (0.7ms)
2013-03-01T00:41:59+00:00 app[web.1]: Processing by PagesController#home as HTML
2013-03-01T00:41:59+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (0.9ms)
2013-03-01T00:41:59+00:00 app[web.1]: Completed 500 Internal Server Error in 1ms
2013-03-01T00:41:59+00:00 heroku[router]: at=info method=GET path=/ host=startupblog.herokuapp.com fwd="174.95.207.136" dyno=web.1 queue=0 wait=0ms connect=2ms service=20ms status=500 bytes=643
2013-03-01T00:41:59+00:00 app[web.1]: 
2013-03-01T00:41:59+00:00 app[web.1]: ActionView::Template::Error (logo.png isn't precompiled):
2013-03-01T00:41:59+00:00 app[web.1]:     20: 
2013-03-01T00:41:59+00:00 app[web.1]:     22:   <div class="navbar-inner">
2013-03-01T00:41:59+00:00 app[web.1]:     23:     <a class="brand"><%=link_to logo, root_path %></a>
2013-03-01T00:41:59+00:00 app[web.1]:     25:       <li class="home"><%= link_to "Home", root_path %></li>
2013-03-01T00:41:59+00:00 app[web.1]:     26:       <li><%= link_to "About", about_path %></li>
2013-03-01T00:41:59+00:00 app[web.1]:     21: <div class="navbar navbar-inverse navbar-static-top">
2013-03-01T00:41:59+00:00 app[web.1]:   app/views/partials/_header.html.erb:23:in `_app_views_partials__header_html_erb___985491214305097811_33520600'
2013-03-01T00:41:59+00:00 app[web.1]:   app/views/pages/home.html.erb:1:in `_app_views_pages_home_html_erb__2767656240117324842_33999760'
2013-03-01T00:41:59+00:00 app[web.1]: 
2013-03-01T00:41:59+00:00 app[web.1]: 
2013-03-01T00:41:59+00:00 app[web.1]:   app/helpers/application_helper.rb:14:in `logo'
2013-03-01T00:41:59+00:00 app[web.1]:     24:     <ul class="nav pull-right">
2013-03-01T00:42:22+00:00 app[web.1]: Started GET "/" for 174.95.207.136 at 2013-03-01 00:42:22 +0000
2013-03-01T00:42:22+00:00 app[web.1]: Processing by PagesController#home as HTML
2013-03-01T00:42:22+00:00 app[web.1]:   Rendered partials/_header.html.erb (0.9ms)
2013-03-01T00:42:22+00:00 app[web.1]:   Rendered pages/home.html.erb within layouts/application (1.3ms)
2013-03-01T00:42:22+00:00 app[web.1]: Completed 500 Internal Server Error in 3ms
2013-03-01T00:42:22+00:00 app[web.1]: 
2013-03-01T00:42:22+00:00 app[web.1]:     25:       <li class="home"><%= link_to "Home", root_path %></li>
2013-03-01T00:42:22+00:00 app[web.1]:   app/views/partials/_header.html.erb:23:in `_app_views_partials__header_html_erb___985491214305097811_33520600'
2013-03-01T00:42:22+00:00 app[web.1]:     26:       <li><%= link_to "About", about_path %></li>
2013-03-01T00:42:22+00:00 app[web.1]: 
2013-03-01T00:42:22+00:00 app[web.1]:   app/views/pages/home.html.erb:1:in `_app_views_pages_home_html_erb__2767656240117324842_33999760'
2013-03-01T00:42:22+00:00 app[web.1]:   app/helpers/application_helper.rb:14:in `logo'
2013-03-01T00:42:22+00:00 app[web.1]: 
2013-03-01T00:42:22+00:00 app[web.1]: ActionView::Template::Error (logo.png isn't precompiled):
2013-03-01T00:42:22+00:00 app[web.1]:     23:     <a class="brand"><%=link_to logo, root_path %></a>
2013-03-01T00:42:22+00:00 app[web.1]:     20: 
2013-03-01T00:42:22+00:00 app[web.1]:     21: <div class="navbar navbar-inverse navbar-static-top">
2013-03-01T00:42:22+00:00 app[web.1]:     22:   <div class="navbar-inner">
2013-03-01T00:42:22+00:00 app[web.1]:     24:     <ul class="nav pull-right">
2013-03-01T00:42:22+00:00 heroku[router]: at=info method=GET path=/ host=startupblog.herokuapp.com fwd="174.95.207.136" dyno=web.1 queue=0 wait=5ms connect=15ms service=25ms status=500 bytes=643



source 'https://rubygems.org'

gem 'rails', '3.2.11'

group :development do
  gem 'sqlite3', '1.3.5'
  gem 'devise'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'bootstrap-sass', '~> 2.3.0.1'
  gem 'coffee-rails', '3.2.2'
  gem 'omniauth'
gem 'omniauth-twitter'
  gem 'uglifier', '1.2.3'
 gem 'mongrel',  '1.2.0.pre2'
 gem 'devise'

end


gem 'jquery-rails', '2.0.2'

group :production do
  gem 'pg', '0.12.2'

end
4

2 回答 2

2

您的问题已明确列出:

/app/config/initializers/devise.rb:3:in `<top (required)>': uninitialized constant Devise (NameError)

如果您可以公开您的应用程序,我将能够立即检查它,但很可能您没有提交您的 Gemfile 或 Gemfile.lock,请确保您的 Gemfile 中列出了您的设计,例如

gem 'devise'

然后运行

bundle

并将 Gemfile 和 Gemfile.lock 提交到您的源代码中并将其推送到 heroku

于 2013-03-01T00:04:23.087 回答
1

出现的错误是:

/app/config/initializers/devise.rb:3:in `<top (required)>': uninitialized constant Devise (NameError)

你的 Gemfile 中有设计吗?

相关:为什么在运行 webrick 服务器时会出现未初始化的常量设计名称错误?

于 2013-03-01T00:04:38.600 回答