- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我是 Ruby on Rails 的新手(完全是编程新手),这是我关于堆栈溢出的第一篇文章。我想提前感谢大家,因为我从以前的帖子中学到了很多东西。
我完成了 Micheal Hartl Ruby on Rails 教程,但无法让它在 Heroku 上成功启动,即使它在本地运行完美。
我做了以下事情:
git push
git push heroku master
heroku pg:reset DATABASE
heroku run rake db:migrate
heroku run rake db:populate
(我也在没有 heroku restart 的情况下完成了同样的结果)
当我执行命令时出现问题:heroku run rake db:populate
这是我的 heroku 日志
2013-04-23T18:27:42.388610+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2013-04-23T18:27:42.388610+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2013-04-23T18:27:44.355310+00:00 heroku[web.1]: Process exited with status 137
2013-04-23T18:27:50.065370+00:00 app[web.1]: Processing by SessionsController#new as HTML
2013-04-23T18:27:50.062379+00:00 app[web.1]: Started GET "/signin" for 75.68.91.34 at 2013-04-23 18:27:50 +0000
2013-04-23T18:27:50.091947+00:00 app[web.1]: Rendered sessions/new.html.erb within layouts/application (24.8ms)
2013-04-23T18:27:50.093017+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:50.095496+00:00 app[web.1]: Rendered layouts/_header.html.erb (2.2ms)
2013-04-23T18:27:50.096137+00:00 app[web.1]: Completed 200 OK in 31ms (Views: 29.2ms | ActiveRecord: 1.0ms)
2013-04-23T18:27:50.095966+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:27:50.102068+00:00 heroku[router]: at=info method=GET path=/signin host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=48ms status=200 bytes=2144
2013-04-23T18:27:52.271911+00:00 app[web.1]: Started GET "/help" for 75.68.91.34 at 2013-04-23 18:27:52 +0000
2013-04-23T18:27:52.275101+00:00 app[web.1]: Processing by StaticPagesController#help as HTML
2013-04-23T18:27:52.276587+00:00 app[web.1]: Rendered static_pages/help.html.erb within layouts/application (0.3ms)
2013-04-23T18:27:52.277601+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:52.281995+00:00 app[web.1]: Rendered layouts/_header.html.erb (4.1ms)
2013-04-23T18:27:52.283227+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.8ms)
2013-04-23T18:27:52.284385+00:00 app[web.1]: Completed 200 OK in 9ms (Views: 7.2ms | ActiveRecord: 1.4ms)
2013-04-23T18:27:52.291644+00:00 heroku[router]: at=info method=GET path=/help host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=21ms status=200 bytes=1639
2013-04-23T18:27:53.244364+00:00 heroku[router]: at=info method=GET path=/ host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=18ms status=304 bytes=0
2013-04-23T18:27:53.227078+00:00 app[web.1]: Started GET "/" for 75.68.91.34 at 2013-04-23 18:27:53 +0000
2013-04-23T18:27:53.230685+00:00 app[web.1]: Processing by StaticPagesController#home as HTML
2013-04-23T18:27:53.233227+00:00 app[web.1]: Rendered static_pages/home.html.erb within layouts/application (0.6ms)
2013-04-23T18:27:53.234925+00:00 app[web.1]: Rendered layouts/_header.html.erb (0.8ms)
2013-04-23T18:27:53.234029+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:53.235301+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:27:53.235416+00:00 app[web.1]: Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 1.0ms)
2013-04-23T18:27:54.503953+00:00 app[web.1]: Started GET "/signin" for 75.68.91.34 at 2013-04-23 18:27:54 +0000
2013-04-23T18:27:54.506797+00:00 app[web.1]: Processing by SessionsController#new as HTML
2013-04-23T18:27:54.509530+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:27:54.508584+00:00 app[web.1]: Rendered sessions/new.html.erb within layouts/application (1.3ms)
2013-04-23T18:27:54.511848+00:00 app[web.1]: Rendered layouts/_header.html.erb (2.1ms)
2013-04-23T18:27:54.512476+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:27:54.512701+00:00 app[web.1]: Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 1.0ms)
2013-04-23T18:27:54.522049+00:00 heroku[router]: at=info method=GET path=/signin host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=16ms status=304 bytes=0
2013-04-23T18:28:02.210398+00:00 app[web.1]: Started GET "/" for 75.68.91.34 at 2013-04-23 18:28:02 +0000
2013-04-23T18:28:02.212290+00:00 app[web.1]: Processing by StaticPagesController#home as HTML
2013-04-23T18:28:02.214616+00:00 app[web.1]: Rendered static_pages/home.html.erb within layouts/application (0.6ms)
2013-04-23T18:28:02.215472+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:28:02.216369+00:00 app[web.1]: Rendered layouts/_header.html.erb (0.8ms)
2013-04-23T18:28:02.216867+00:00 app[web.1]: Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.9ms)
2013-04-23T18:28:02.216742+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:28:02.224795+00:00 heroku[router]: at=info method=GET path=/ host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=15ms status=304 bytes=0
2013-04-23T18:28:03.312964+00:00 app[web.1]: Started GET "/signup" for 75.68.91.34 at 2013-04-23 18:28:03 +0000
2013-04-23T18:28:03.320889+00:00 app[web.1]: Processing by UsersController#new as HTML
2013-04-23T18:28:03.330931+00:00 app[web.1]: Rendered shared/_error_messages.html.erb (0.3ms)
2013-04-23T18:28:03.332690+00:00 app[web.1]: Rendered users/new.html.erb within layouts/application (4.5ms)
2013-04-23T18:28:03.333486+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.0ms)
2013-04-23T18:28:03.335702+00:00 app[web.1]: Rendered layouts/_header.html.erb (2.1ms)
2013-04-23T18:28:03.336140+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.3ms)
2013-04-23T18:28:03.336258+00:00 app[web.1]: Completed 200 OK in 15ms (Views: 8.2ms | ActiveRecord: 1.0ms)
2013-04-23T18:28:03.343166+00:00 heroku[router]: at=info method=GET path=/signup host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=31ms status=200 bytes=2403
2013-04-23T18:28:23.175897+00:00 app[web.1]: Processing by UsersController#create as HTML
2013-04-23T18:28:23.172784+00:00 app[web.1]: Started POST "/users" for 75.68.91.34 at 2013-04-23 18:28:23 +0000
2013-04-23T18:28:23.175897+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"rdA4wrQvQhEhejI6uTXYg2YZpa5sl7gkYeabVJZQmFA=", "user"=>{"name"=>"Dana Bouchard", "email"=>"dbouchard138@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Create my account"}
2013-04-23T18:28:23.429861+00:00 app[web.1]: Redirected to https://polar-wildwood-1990.herokuapp.com/users/1
2013-04-23T18:28:23.433167+00:00 app[web.1]: Completed 302 Found in 256ms (ActiveRecord: 21.6ms)
2013-04-23T18:28:23.449918+00:00 heroku[router]: at=info method=POST path=/users host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=3ms service=315ms status=302 bytes=115
2013-04-23T18:28:23.497155+00:00 app[web.1]: Parameters: {"id"=>"1"}
2013-04-23T18:28:23.490244+00:00 app[web.1]: Started GET "/users/1" for 75.68.91.34 at 2013-04-23 18:28:23 +0000
2013-04-23T18:28:23.496980+00:00 app[web.1]: Processing by UsersController#show as HTML
2013-04-23T18:28:23.722402+00:00 app[web.1]: Rendered shared/_stats.html.erb (54.1ms)
2013-04-23T18:28:23.787319+00:00 app[web.1]: Rendered users/show.html.erb within layouts/application (120.1ms)
2013-04-23T18:28:23.787319+00:00 app[web.1]: Completed 500 Internal Server Error in 290ms
2013-04-23T18:28:23.789034+00:00 app[web.1]: ActionView::Template::Error (PGError: ERROR: relation "microposts" does not exist
2013-04-23T18:28:23.789034+00:00 app[web.1]:
2013-04-23T18:28:23.789034+00:00 app[web.1]: LINE 5: WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789034+00:00 app[web.1]: ^
2013-04-23T18:28:23.789034+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2013-04-23T18:28:23.789034+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2013-04-23T18:28:23.789034+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-04-23T18:28:23.789034+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2013-04-23T18:28:23.789034+00:00 app[web.1]:
WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789293+00:00 app[web.1]: ):
2013-04-23T18:28:23.789293+00:00 app[web.1]: ORDER BY a.attnum
2013-04-23T18:28:23.789293+00:00 app[web.1]: 15: <%= render 'follow_form' if signed_in? %>
2013-04-23T18:28:23.789034+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2013-04-23T18:28:23.789293+00:00 app[web.1]: 13: </aside>
2013-04-23T18:28:23.789293+00:00 app[web.1]: 14: <div class="span8">
2013-04-23T18:28:23.800620+00:00 heroku[router]: at=info method=GET path=/users/1 host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=313ms status=500 bytes=643
2013-04-23T18:28:23.789293+00:00 app[web.1]: 16: <% if @user.microposts.any? %>
2013-04-23T18:28:23.789293+00:00 app[web.1]: 17: <h3>Microposts (<%= @user.microposts.count %>)</h3>
2013-04-23T18:28:23.789293+00:00 app[web.1]: 18: <ol class="microposts">
2013-04-23T18:28:23.789293+00:00 app[web.1]: 19: <%= render @microposts %>
2013-04-23T18:28:23.789293+00:00 app[web.1]: app/views/users/show.html.erb:16:in `_app_views_users_show_html_erb__4534392174835113617_69860797342160'
2013-04-23T18:28:23.789517+00:00 app[web.1]:
2013-04-23T18:28:23.789517+00:00 app[web.1]:
2013-04-23T18:28:38.118917+00:00 heroku[api]: Starting process with command `bundle exec rake db:populate` by dbouchard138@gmail.com
2013-04-23T18:28:40.122057+00:00 heroku[run.9072]: Awaiting client
2013-04-23T18:28:40.141935+00:00 heroku[run.9072]: Starting process with command `bundle exec rake db:populate`
2013-04-23T18:28:41.013463+00:00 heroku[run.9072]: State changed from starting to up
2013-04-23T18:29:06.377140+00:00 heroku[run.9072]: Process exited with status 1
2013-04-23T18:29:06.395386+00:00 heroku[run.9072]: State changed from up to complete
2013-04-23T19:31:08.418618+00:00 heroku[web.1]: Idling
2013-04-23T19:31:11.275801+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-04-23T19:31:12.010696+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
2013-04-23T19:31:12.010696+00:00 app[web.1]: [2013-04-23 19:31:12] ERROR SignalException: SIGTERM
2013-04-23T19:31:22.107373+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2013-04-23T19:31:22.107928+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2013-04-23T19:31:23.892161+00:00 heroku[web.1]: State changed from up to down
2013-04-23T19:31:23.878809+00:00 heroku[web.1]: Process exited with status 137
这可能很容易解决,我认为下面是罪魁祸首,但我无法弄清楚为什么或如何找到问题。
2013-04-23T18:28:23.789034+00:00 app[web.1]: ActionView::Template::Error (PGError: ERROR: relation "microposts" does not exist
2013-04-23T18:28:23.789034+00:00 app[web.1]:
2013-04-23T18:28:23.789034+00:00 app[web.1]: LINE 5: WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789034+00:00 app[web.1]: ^
2013-04-23T18:28:23.789034+00:00 app[web.1]: : SELECT a.attname, format_type(a.atttypid, a.atttypmod),
2013-04-23T18:28:23.789034+00:00 app[web.1]: pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
2013-04-23T18:28:23.789034+00:00 app[web.1]: FROM pg_attribute a LEFT JOIN pg_attrdef d
2013-04-23T18:28:23.789034+00:00 app[web.1]: ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2013-04-23T18:28:23.789034+00:00 app[web.1]:
WHERE a.attrelid = '"microposts"'::regclass
2013-04-23T18:28:23.789293+00:00 app[web.1]: ):
2013-04-23T18:28:23.789293+00:00 app[web.1]: ORDER BY a.attnum
2013-04-23T18:28:23.789293+00:00 app[web.1]: 15: <%= render 'follow_form' if signed_in? %>
2013-04-23T18:28:23.789034+00:00 app[web.1]: AND a.attnum > 0 AND NOT a.attisdropped
2013-04-23T18:28:23.789293+00:00 app[web.1]: 13: </aside>
2013-04-23T18:28:23.789293+00:00 app[web.1]: 14: <div class="span8">
2013-04-23T18:28:23.800620+00:00 heroku[router]: at=info method=GET path=/users/1 host=polar-wildwood-1990.herokuapp.com fwd="75.68.91.34" dyno=web.1 connect=2ms service=313ms status=500 bytes=643
2013-04-23T18:28:23.789293+00:00 app[web.1]: 16: <% if @user.microposts.any? %>
2013-04-23T18:28:23.789293+00:00 app[web.1]: 17: <h3>Microposts (<%= @user.microposts.count %>)</h3>
2013-04-23T18:28:23.789293+00:00 app[web.1]: 18: <ol class="microposts">
2013-04-23T18:28:23.789293+00:00 app[web.1]: 19: <%= render @microposts %>
2013-04-23T18:28:23.789293+00:00 app[web.1]: app/views/users/show.html.erb:16:in `_app_views_users_show_html_erb__4534392174835113617_69860797342160'
请帮忙,如果您需要更多信息,请告诉我。提前谢谢你。
最佳答案
在我看来您没有将模式加载到您的 heroku 数据库中。部署后执行此操作时发生的情况:
heroku run rake db:schema:load
请注意,有时如果您正在加载一个具有已建立架构的新应用程序,运行所有迁移并不是使数据库达到您想要的状态的最佳方式 - 您应该使用 rake db:schema:load
代替。让我知道这是否使您的数据库正确。
运行后,您可以使用 heroku run console
然后执行控制台命令,例如 User.all
以确保它知道 users
表存在等
不要忘记在加载模式或运行 db:migrate
后重新启动服务器。对于 heroku 那将是:heroku restart
关于ruby-on-rails - Hartl 的 Rails 教程已完成,在本地完美运行。 Heroku 坚持 "We' 抱歉,但出了点问题。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16178416/
我正在做一个关于代码学院的教程,我在这里收到一个错误,说“看起来你的函数没有返回‘唉,你没有资格获得信用卡。资本主义就是这样残酷。’”当收入参数为 75 时。”但是该字符串在控制台中返回(由于某种原因
我正在阅读 Go 的官方教程,但很难理解 Channel 和 Buffered Channels 之间的区别。教程的链接是 https://tour.golang.org/concurrency/2和
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 9年前关闭。 Improve this que
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,因为
作为 iOS 新手,有大量书籍可以满足学习基础知识的需求。现在,我想转向一些高级阅读,例如 OAuth 和 SQLite 以及动态 API 派生的 TableView 等。您可以推荐任何资源吗? 最佳
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 8 年前。 Improve
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 8 年前。
前言 很多同学都知道,我们常见的CTF赛事除了解题赛之外,还有一种赛制叫AWD赛制。在这种赛制下,我们战队会拿到一个或多个服务器。服务器的连接方式通常是SSH链接,并且可能一个战队可能会同时有
Memcached是一个自由开源的,高性能,分布式内存键值对缓存系统 Memcached 是一种基于内存的key-value存储,用来存储小块的任意数据(字符串、对象),这些数据可以是数据库调用、A
Perl 又名实用报表提取语言, 是 Practical Extraction and Report Language 的缩写 Perl 是由 拉里·沃尔(Larry Wall)于19
WSDL 是 Web Services Description Language 的缩写,翻译成中文就是网络服务描述语言 WSDL 是一门基于 XML 的语言,用于描述 Web Services 以
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 6年前关闭。 Improve thi
我正在寻找解释在 WPF 中创建自定义用户控件的教程。 我想要一个控件,它结合了一个文本 block 、一个文本框和一个启动通用文件打开对话框的按钮。我已经完成了布局,一切都连接好了。它有效,但它是三
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我接近 fourth page of the Django tutorial 的开始看着vote查看,最后是这样的: # Always return an HttpResponseRedirect a
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
是否有任何好的 Qt QSS 教程,或者在某个地方我可以看到样式小部件的示例?如果某处可用,我想要一些完整的引用。除了有关如何设置按钮或某些选项卡样式的小教程外,我找不到任何其他内容。 最佳答案 Qt
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我是一名优秀的程序员,十分优秀!