为什么我一直收到Heroku 500错误?

时间:2013-05-17 01:12:14

标签: sql ruby-on-rails ruby database heroku

我是rails开发的新手,我不断从heroku收到错误 application.js中: //这是一个清单文件,可以编译成application.js,其中包含所有文件

// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .

这是日志:

   2013-05-17T01:07:35.161651+00:00 app[web.1]:     10:   <%= csrf_meta_tags %>
2013-05-17T01:07:35.161651+00:00 app[web.1]:     11:   <meta name="viewport" content="width=device-width, initial-scale=1.0">
2013-05-17T01:07:35.161651+00:00 app[web.1]:     12: </head>
2013-05-17T01:07:35.161651+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb___296345013052741914_26637620'
2013-05-17T01:07:35.161651+00:00 app[web.1]: 
2013-05-17T01:07:35.162109+00:00 app[web.1]: 
2013-05-17T01:07:35.162109+00:00 app[web.1]: ActionView::Template::Error (couldn't find file 'twitter/bootstrap'
2013-05-17T01:07:35.162109+00:00 app[web.1]:   (in /app/app/assets/javascripts/application.js:15)):
2013-05-17T01:07:35.161651+00:00 app[web.1]: 
2013-05-17T01:07:35.162109+00:00 app[web.1]:     7:   <![endif]-->
2013-05-17T01:07:35.161869+00:00 app[web.1]: Started GET "/" for 97.116.68.224 at 2013-05-17 01:07:34 +0000
2013-05-17T01:07:35.161869+00:00 app[web.1]: Processing by HomeController#index as HTML
2013-05-17T01:07:35.162109+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.1ms)
2013-05-17T01:07:35.162109+00:00 app[web.1]: Completed 500 Internal Server Error in 7ms
2013-05-17T01:07:35.162329+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb___296345013052741914_26637620'
2013-05-17T01:07:35.162329+00:00 app[web.1]: 
2013-05-17T01:07:35.162109+00:00 app[web.1]:     6:     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
2013-05-17T01:07:35.162109+00:00 app[web.1]:     9:   <%= javascript_include_tag "application" %>
2013-05-17T01:07:35.162329+00:00 app[web.1]:     12: </head>
2013-05-17T01:07:35.162109+00:00 app[web.1]:     8:   <%= stylesheet_link_tag    "application", :media => "all" %>
2013-05-17T01:07:35.162109+00:00 app[web.1]:     10:   <%= csrf_meta_tags %>
2013-05-17T01:07:35.162329+00:00 app[web.1]:     11:   <meta name="viewport" content="width=device-width, initial-scale=1.0">
2013-05-17T01:07:35.162329+00:00 app[web.1]: 
2013-05-17T01:07:35.162543+00:00 app[web.1]: Started GET "/" for 97.116.68.224 at 2013-05-17 01:07:34 +0000
2013-05-17T01:07:35.162543+00:00 app[web.1]: Completed 500 Internal Server Error in 6ms
2013-05-17T01:07:35.162543+00:00 app[web.1]: 
2013-05-17T01:07:35.162543+00:00 app[web.1]: ActionView::Template::Error (couldn't find file 'twitter/bootstrap'
2013-05-17T01:07:35.162543+00:00 app[web.1]:   (in /app/app/assets/javascripts/application.js:15)):
2013-05-17T01:07:35.162543+00:00 app[web.1]:     6:     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
2013-05-17T01:07:35.162543+00:00 app[web.1]: Processing by HomeController#index as HTML
2013-05-17T01:07:35.162543+00:00 app[web.1]:     7:   <![endif]-->
2013-05-17T01:07:35.162761+00:00 app[web.1]:     8:   <%= stylesheet_link_tag    "application", :media => "all" %>
2013-05-17T01:07:35.162761+00:00 app[web.1]:     9:   <%= javascript_include_tag "application" %>
2013-05-17T01:07:35.162543+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.1ms)
2013-05-17T01:07:35.162761+00:00 app[web.1]:     10:   <%= csrf_meta_tags %>
2013-05-17T01:07:35.162761+00:00 app[web.1]: 
2013-05-17T01:07:35.163007+00:00 app[web.1]: Started GET "/" for 97.116.68.224 at 2013-05-17 01:07:34 +0000
2013-05-17T01:07:35.163292+00:00 app[web.1]: Processing by HomeController#index as HTML
2013-05-17T01:07:35.163292+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.1ms)
2013-05-17T01:07:35.162761+00:00 app[web.1]: 
2013-05-17T01:07:35.162761+00:00 app[web.1]:     12: </head>
2013-05-17T01:07:35.162761+00:00 app[web.1]:     11:   <meta name="viewport" content="width=device-width, initial-scale=1.0">
2013-05-17T01:07:35.162761+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb___296345013052741914_26637620'
2013-05-17T01:07:35.163292+00:00 app[web.1]: Completed 500 Internal Server Error in 5ms
2013-05-17T01:07:35.163292+00:00 app[web.1]:   (in /app/app/assets/javascripts/application.js:15)):
2013-05-17T01:07:35.163292+00:00 app[web.1]:     8:   <%= stylesheet_link_tag    "application", :media => "all" %>
2013-05-17T01:07:35.163292+00:00 app[web.1]:     9:   <%= javascript_include_tag "application" %>
2013-05-17T01:07:35.163511+00:00 app[web.1]:     10:   <%= csrf_meta_tags %>
2013-05-17T01:07:35.163511+00:00 app[web.1]:     11:   <meta name="viewport" content="width=device-width, initial-scale=1.0">
2013-05-17T01:07:35.163511+00:00 app[web.1]:     12: </head>
2013-05-17T01:07:35.163292+00:00 app[web.1]: 
2013-05-17T01:07:35.163292+00:00 app[web.1]: ActionView::Template::Error (couldn't find file 'twitter/bootstrap'
2013-05-17T01:07:35.163292+00:00 app[web.1]:     6:     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
2013-05-17T01:07:35.163292+00:00 app[web.1]:     7:   <![endif]-->
2013-05-17T01:07:35.163511+00:00 app[web.1]: 
2013-05-17T01:07:35.163511+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb___296345013052741914_26637620'
2013-05-17T01:07:35.163511+00:00 app[web.1]: 
2013-05-17T01:07:35.164363+00:00 app[web.1]: ActionView::Template::Error (couldn't find file 'twitter/bootstrap'
2013-05-17T01:07:35.164363+00:00 app[web.1]: 
2013-05-17T01:07:35.164363+00:00 app[web.1]: Completed 500 Internal Server Error in 6ms
2013-05-17T01:07:35.164363+00:00 app[web.1]: Processing by HomeController#index as HTML
2013-05-17T01:07:35.164578+00:00 app[web.1]:     12: </head>
2013-05-17T01:07:35.164578+00:00 app[web.1]:     11:   <meta name="viewport" content="width=device-width, initial-scale=1.0">
2013-05-17T01:07:35.164363+00:00 app[web.1]:   (in /app/app/assets/javascripts/application.js:15)):
2013-05-17T01:07:35.164363+00:00 app[web.1]:     7:   <![endif]-->
2013-05-17T01:07:35.164363+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.1ms)
2013-05-17T01:07:35.164141+00:00 app[web.1]: Started GET "/" for 97.116.68.224 at 2013-05-17 01:07:34 +0000
2013-05-17T01:07:35.164363+00:00 app[web.1]:     8:   <%= stylesheet_link_tag    "application", :media => "all" %>
2013-05-17T01:07:35.164363+00:00 app[web.1]:     6:     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
2013-05-17T01:07:35.164578+00:00 app[web.1]:     9:   <%= javascript_include_tag "application" %>
2013-05-17T01:07:35.164578+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb___296345013052741914_26637620'
2013-05-17T01:07:35.164578+00:00 app[web.1]: 
2013-05-17T01:07:35.164578+00:00 app[web.1]:     10:   <%= csrf_meta_tags %>
2013-05-17T01:07:35.164578+00:00 app[web.1]: 
2013-05-17T01:07:34.585624+00:00 heroku[router]: at=info method=GET path=/ host=desolate-stream-5449.herokuapp.com fwd="97.116.68.224" dyno=web.1 connect=1ms service=13ms status=500 bytes=643
2013-05-17T01:07:33.128607+00:00 heroku[router]: at=info method=GET path=/ host=desolate-stream-5449.herokuapp.com fwd="97.116.68.224" dyno=web.1 connect=0ms service=15ms status=500 bytes=643
2013-05-17T01:08:34.121772+00:00 heroku[api]: Starting process with command `bundle exec rake db:version` by shirwa99@gmail.com
2013-05-17T01:08:36.213605+00:00 heroku[run.7274]: Awaiting client
2013-05-17T01:08:36.324096+00:00 heroku[run.7274]: Starting process with command `bundle exec rake db:version`
2013-05-17T01:08:37.032487+00:00 heroku[run.7274]: State changed from starting to up
2013-05-17T01:08:41.870397+00:00 heroku[run.7274]: State changed from up to complete
2013-05-17T01:08:41.862423+00:00 heroku[run.7274]: Process exited with status 0
2013-05-17T01:17:00.656365+00:00 heroku[router]: at=info method=GET path=/ host=desolate-stream-5449.herokuapp.com fwd="59.189.51.75, 218.186.8.249" dyno=web.1 connect=8
ms service=32ms status=500 bytes=643
2013-05-17T01:17:00.647418+00:00 app[web.1]: Processing by HomeController#index as HTML
2013-05-17T01:17:00.648041+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.1ms)
2013-05-17T01:17:00.653801+00:00 app[web.1]: Completed 500 Internal Server Error in 6ms
2013-05-17T01:17:00.656124+00:00 app[web.1]: 
2013-05-17T01:17:00.656124+00:00 app[web.1]: ActionView::Template::Error (couldn't find file 'twitter/bootstrap'
2013-05-17T01:17:00.656124+00:00 app[web.1]:   (in /app/app/assets/javascripts/application.js:15)):
2013-05-17T01:17:00.656124+00:00 app[web.1]:     6:     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
2013-05-17T01:17:00.656124+00:00 app[web.1]:     7:   <![endif]-->
2013-05-17T01:17:00.656124+00:00 app[web.1]:     8:   <%= stylesheet_link_tag    "application", :media => "all" %>
2013-05-17T01:17:00.656124+00:00 app[web.1]:     9:   <%= javascript_include_tag "application" %>
2013-05-17T01:17:00.656124+00:00 app[web.1]:     10:   <%= csrf_meta_tags %>
2013-05-17T01:17:00.656124+00:00 app[web.1]:     11:   <meta name="viewport" content="width=device-width, initial-scale=1.0">
2013-05-17T01:17:00.656124+00:00 app[web.1]:     12: </head>
2013-05-17T01:17:00.656406+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb___296345013052741914_26637620'
2013-05-17T01:17:00.656406+00:00 app[web.1]: 
2013-05-17T01:17:00.656406+00:00 app[web.1]: 
2013-05-17T01:17:00.634861+00:00 app[web.1]: Started GET "/" for 218.186.8.249 at 2013-05-17 01:17:00 +0000
2013-05-17T01:17:01.620125+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=desolate-stream-5449.herokuapp.com fwd="218.186.8.249" dyno=web.1 connect=1ms service=6ms status=200 bytes=0

我不知道为什么会这样做。每次我打开网站时,它都会给我错误,但是当我在本地运行它时它工作正常。我不知道如何实际阅读日志。我尝试了所有其他相关问题,但没有一个解决方案似乎有效。感谢。

1 个答案:

答案 0 :(得分:0)

尝试从Gemfile中的资产组中移出gem 'twitter-bootstrap-rails'。或者尝试在application.js

中添加bootstrap而不是twitter/bootstrap

希望这有帮助!