简体   繁体   English

Rails应用程序在Heroku中崩溃

[英]Rails app crashing in heroku

I've been all over today trying to figure out why my rails app is crashing on heroku. 今天我一直在努力弄清为什么我的rails应用程序在heroku上崩溃。

Here's the output from heroku log: 这是heroku日志的输出:

2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/config.ru:1:in `<main>'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/config.ru:1:in `new'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/server.rb:46:in `app'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/server.rb:70:in `start'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
2012-09-06T01:33:43+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
2012-09-06T01:33:43+00:00 app[web.1]:   from script/rails:6:in `require'
2012-09-06T01:33:43+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-09-06T01:33:44+00:00 heroku[web.1]: Process exited with status 1
2012-09-06T01:33:44+00:00 heroku[web.1]: State changed from starting to crashed
2012-09-06T01:33:46+00:00 heroku[router]: Error H10 (App crashed) -> GET whispering-atoll-2029.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-09-06T01:33:46+00:00 heroku[router]: Error H10 (App crashed) -> GET whispering-atoll-2029.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-09-06T01:41:17+00:00 heroku[slugc]: Slug compilation started
2012-09-06T01:41:49+00:00 heroku[api]: Release v10 created by jared@xoorath.com
2012-09-06T01:41:49+00:00 heroku[api]: Deploy 1c4a107 by jared@xoorath.com
2012-09-06T01:41:49+00:00 heroku[web.1]: State changed from crashed to starting
2012-09-06T01:41:50+00:00 heroku[slugc]: Slug compilation finished
2012-09-06T01:41:55+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 51538`
2012-09-06T01:42:11+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-09-06T01:42:11+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-09-06T01:42:11+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-09-06T01:42:14+00:00 app[web.1]: => Booting WEBrick
2012-09-06T01:42:14+00:00 app[web.1]: => Rails 3.2.8 application starting in production on http://0.0.0.0:51538
2012-09-06T01:42:14+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-09-06T01:42:14+00:00 app[web.1]: => Call with -d to detach
2012-09-06T01:42:14+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2012-09-06T01:42:14+00:00 app[web.1]: Exiting
2012-09-06T01:42:14+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.2.0/lib/bundler/rubygems_integration.rb:147:in `block in replace_gem': Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.) (LoadError)
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:7:in `<top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in `resolve_hash_connection'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:27:in `spec'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:129:in `establish_connection'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `each'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/base.rb:721:in `<top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/orm/active_record.rb:3:in `<top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/config/initializers/devise.rb:16:in `block in <top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/config/initializers/devise.rb:3:in `<top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise.rb:247:in `setup'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `block in load'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:587:in `each'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:587:in `block in <class:Engine>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/config/environment.rb:5:in `<top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/config.ru:4:in `block in <main>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/config.ru:1:in `<main>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/config.ru:1:in `new'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/server.rb:46:in `app'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/server.rb:70:in `start'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
2012-09-06T01:42:14+00:00 app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
2012-09-06T01:42:14+00:00 app[web.1]:   from script/rails:6:in `require'
2012-09-06T01:42:14+00:00 app[web.1]:   from script/rails:6:in `<main>'
2012-09-06T01:42:16+00:00 heroku[web.1]: Process exited with status 1
2012-09-06T01:42:16+00:00 heroku[web.1]: State changed from starting to crashed
2012-09-06T01:42:17+00:00 heroku[router]: Error H10 (App crashed) -> GET whispering-atoll-2029.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-09-06T01:42:17+00:00 heroku[router]: Error H10 (App crashed) -> GET whispering-atoll-2029.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2012-09-06T01:42:19+00:00 heroku[router]: Error H10 (App crashed) -> GET whispering-atoll-2029.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
2012-09-06T01:42:19+00:00 heroku[router]: Error H10 (App crashed) -> GET whispering-atoll-2029.herokuapp.com/favicon.ico dyno= queue= wait= service= status=503 bytes=

Here's my gemfile: 这是我的gemfile:

source 'https://rubygems.org'
gem 'rails', '3.2.8'

#gem 'thin', '1.2.8'
gem 'devise'
group :development, :test do
  gem 'sqlite3-ruby', :require => 'sqlite3'
end
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "compass-rails", ">= 1.0.3", :group => :assets
gem "zurb-foundation", ">= 3.0.9", :group => :assets
gem "simple_form", ">= 2.0.2"

Here is my repo 这是我的回购

I'm using devise, foundation.zurb, and a few other things. 我正在使用devise,foundation.zurb和其他一些东西。 This is my first rails app, so maybe there is some important info I'm forgetting to tell you guys. 这是我的第一个Rails应用程序,所以也许有些重要的信息我忘了告诉大家。 Any help is greatly appreciated! 任何帮助是极大的赞赏! Note that I've been changing things left right and center to try and get this fixed, so note that my gemfile from pastie is not the same as the one in the repo. 请注意,我一直在左右左右更改内容以尝试解决此问题,因此请注意,我来自pastie的gemfile与回购中的gemfile不同。 The one I pasted here is the one I'm trying to use. 我在这里粘贴的是我要使用的一个。

Let me know if there is any more information I can provide. 让我知道是否可以提供更多信息。

Update:::::::::::::::::::::::::::::::: 更新:::::::::::::::::::::::::::::::::

I've changed my gemfile like so: 我已经像这样更改了我的gemfile:

source 'https://rubygems.org'
gem 'rails', '3.2.8'

#gem 'thin', '1.2.8'
gem 'devise'
group :production do
    gem 'pg'
end
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "compass-rails", ">= 1.0.3", :group => :assets
gem "zurb-foundation", ">= 3.0.9", :group => :assets
gem "simple_form", ">= 2.0.2"

and now it's not crashing, but I'm hitting the 500.html file 现在它没有崩溃,但是我正在击中500.html文件

Here's the heoku log: 这是heoku日志:

2012-09-06T02:21:50+00:00 app[web.1]: => Call with -d to detach
2012-09-06T02:21:50+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-09-06T02:21:50+00:00 app[web.1]: Connecting to database specified by DATABASE_URL
2012-09-06T02:21:52+00:00 app[web.1]: Hello World[2012-09-06 02:21:52] INFO  WEBrick 1.3.1
2012-09-06T02:21:52+00:00 app[web.1]: [2012-09-06 02:21:52] INFO  WEBrick::HTTPServer#start: pid=2 port=14673
2012-09-06T02:21:52+00:00 app[web.1]: [2012-09-06 02:21:52] INFO  ruby 1.9.2 (2011-07-09) [x86_64-linux]
2012-09-06T02:21:53+00:00 heroku[web.1]: State changed from starting to up
2012-09-06T02:21:55+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
2012-09-06T02:21:55+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2012-09-06T02:21:57+00:00 heroku[web.1]: Process exited with status 137
2012-09-06T02:22:00+00:00 app[web.1]: 
2012-09-06T02:22:00+00:00 app[web.1]: 
2012-09-06T02:22:00+00:00 app[web.1]: Started GET "/" for 74.14.32.8 at 2012-09-06 02:22:00 +0000
2012-09-06T02:22:00+00:00 app[web.1]: Processing by HomeController#index as HTML
2012-09-06T02:22:00+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (12.3ms)
2012-09-06T02:22:00+00:00 app[web.1]: Completed 500 Internal Server Error in 147ms
2012-09-06T02:22:00+00:00 app[web.1]: 
2012-09-06T02:22:00+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: foundation/common/ratios.
2012-09-06T02:22:00+00:00 app[web.1]:     6:     <title>Timetracker</title>
2012-09-06T02:22:00+00:00 app[web.1]:     7:     <meta name="description" content=""/>
2012-09-06T02:22:00+00:00 app[web.1]: Load path: /app
2012-09-06T02:22:00+00:00 app[web.1]:     9:     <%= stylesheet_link_tag    "application", :media => "all" %>
2012-09-06T02:22:00+00:00 app[web.1]:   (in /app/app/assets/stylesheets/foundation_and_overrides.scss)):
2012-09-06T02:22:00+00:00 app[web.1]:     10:     <%= javascript_include_tag "application" %>
2012-09-06T02:22:00+00:00 app[web.1]:     8:     <meta name="author" content=""/>
2012-09-06T02:22:00+00:00 app[web.1]:     11:     <%= csrf_meta_tags %>
2012-09-06T02:22:00+00:00 app[web.1]:     12:     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
2012-09-06T02:22:00+00:00 app[web.1]:   app/assets/stylesheets/foundation_and_overrides.scss:1
2012-09-06T02:22:00+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__3480637122833364973_39068600'
2012-09-06T02:22:00+00:00 app[web.1]: 
2012-09-06T02:22:00+00:00 app[web.1]: 
2012-09-06T02:22:00+00:00 heroku[router]: GET whispering-atoll-2029.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=275ms status=500 bytes=643
2012-09-06T02:22:00+00:00 heroku[router]: GET whispering-atoll-2029.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=12ms status=200 bytes=1150
2012-09-06T02:22:02+00:00 app[web.1]: 
2012-09-06T02:22:02+00:00 app[web.1]: 
2012-09-06T02:22:02+00:00 app[web.1]: Started GET "/" for 74.14.32.8 at 2012-09-06 02:22:02 +0000
2012-09-06T02:22:02+00:00 app[web.1]: Processing by HomeController#index as HTML
2012-09-06T02:22:02+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.0ms)
2012-09-06T02:22:02+00:00 app[web.1]: Completed 500 Internal Server Error in 8ms
2012-09-06T02:22:02+00:00 app[web.1]: Load path: /app
2012-09-06T02:22:02+00:00 app[web.1]: 
2012-09-06T02:22:02+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: foundation/common/ratios.
2012-09-06T02:22:02+00:00 app[web.1]:   (in /app/app/assets/stylesheets/foundation_and_overrides.scss)):
2012-09-06T02:22:02+00:00 app[web.1]:     7:     <meta name="description" content=""/>
2012-09-06T02:22:02+00:00 app[web.1]:     6:     <title>Timetracker</title>
2012-09-06T02:22:02+00:00 app[web.1]:     10:     <%= javascript_include_tag "application" %>
2012-09-06T02:22:02+00:00 app[web.1]:     8:     <meta name="author" content=""/>
2012-09-06T02:22:02+00:00 app[web.1]:     9:     <%= stylesheet_link_tag    "application", :media => "all" %>
2012-09-06T02:22:02+00:00 app[web.1]: 
2012-09-06T02:22:02+00:00 app[web.1]:   app/assets/stylesheets/foundation_and_overrides.scss:1
2012-09-06T02:22:02+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__3480637122833364973_39068600'
2012-09-06T02:22:02+00:00 app[web.1]:     11:     <%= csrf_meta_tags %>
2012-09-06T02:22:02+00:00 app[web.1]:     12:     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
2012-09-06T02:22:02+00:00 app[web.1]: 
2012-09-06T02:22:02+00:00 heroku[router]: GET whispering-atoll-2029.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=43ms status=500 bytes=643
2012-09-06T02:22:03+00:00 app[web.1]: 
2012-09-06T02:22:03+00:00 app[web.1]: Started GET "/" for 74.14.32.8 at 2012-09-06 02:22:03 +0000
2012-09-06T02:22:03+00:00 app[web.1]: 
2012-09-06T02:22:03+00:00 app[web.1]: Processing by HomeController#index as HTML
2012-09-06T02:22:03+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.0ms)
2012-09-06T02:22:03+00:00 app[web.1]: Completed 500 Internal Server Error in 9ms
2012-09-06T02:22:03+00:00 app[web.1]: 
2012-09-06T02:22:03+00:00 app[web.1]:     8:     <meta name="author" content=""/>
2012-09-06T02:22:03+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: foundation/common/ratios.
2012-09-06T02:22:03+00:00 app[web.1]:     10:     <%= javascript_include_tag "application" %>
2012-09-06T02:22:03+00:00 app[web.1]: Load path: /app
2012-09-06T02:22:03+00:00 app[web.1]:   (in /app/app/assets/stylesheets/foundation_and_overrides.scss)):
2012-09-06T02:22:03+00:00 app[web.1]:     6:     <title>Timetracker</title>
2012-09-06T02:22:03+00:00 app[web.1]:     7:     <meta name="description" content=""/>
2012-09-06T02:22:03+00:00 app[web.1]:     9:     <%= stylesheet_link_tag    "application", :media => "all" %>
2012-09-06T02:22:03+00:00 app[web.1]:     11:     <%= csrf_meta_tags %>
2012-09-06T02:22:03+00:00 app[web.1]:     12:     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
2012-09-06T02:22:03+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__3480637122833364973_39068600'
2012-09-06T02:22:03+00:00 app[web.1]:   app/assets/stylesheets/foundation_and_overrides.scss:1
2012-09-06T02:22:03+00:00 app[web.1]: 
2012-09-06T02:22:03+00:00 app[web.1]: 
2012-09-06T02:22:03+00:00 heroku[router]: GET whispering-atoll-2029.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=32ms status=500 bytes=643
2012-09-06T02:22:03+00:00 heroku[router]: GET whispering-atoll-2029.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=4ms status=304 bytes=0
2012-09-06T02:22:06+00:00 app[web.1]: 
2012-09-06T02:22:06+00:00 app[web.1]: 
2012-09-06T02:22:06+00:00 app[web.1]: Started GET "/" for 74.14.32.8 at 2012-09-06 02:22:06 +0000
2012-09-06T02:22:06+00:00 app[web.1]: Processing by HomeController#index as HTML
2012-09-06T02:22:06+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.0ms)
2012-09-06T02:22:06+00:00 app[web.1]: Completed 500 Internal Server Error in 9ms
2012-09-06T02:22:06+00:00 app[web.1]: 
2012-09-06T02:22:06+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: foundation/common/ratios.
2012-09-06T02:22:06+00:00 app[web.1]: Load path: /app
2012-09-06T02:22:06+00:00 app[web.1]:   (in /app/app/assets/stylesheets/foundation_and_overrides.scss)):
2012-09-06T02:22:06+00:00 app[web.1]:     6:     <title>Timetracker</title>
2012-09-06T02:22:06+00:00 app[web.1]:     7:     <meta name="description" content=""/>
2012-09-06T02:22:06+00:00 app[web.1]:     8:     <meta name="author" content=""/>
2012-09-06T02:22:06+00:00 app[web.1]:     9:     <%= stylesheet_link_tag    "application", :media => "all" %>
2012-09-06T02:22:06+00:00 app[web.1]:     10:     <%= javascript_include_tag "application" %>
2012-09-06T02:22:06+00:00 app[web.1]:     11:     <%= csrf_meta_tags %>
2012-09-06T02:22:06+00:00 app[web.1]:     12:     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
2012-09-06T02:22:06+00:00 app[web.1]:   app/assets/stylesheets/foundation_and_overrides.scss:1
2012-09-06T02:22:06+00:00 app[web.1]:   app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__3480637122833364973_39068600'
2012-09-06T02:22:06+00:00 app[web.1]: 
2012-09-06T02:22:06+00:00 heroku[router]: GET whispering-atoll-2029.herokuapp.com/ dyno=web.1 queue=0 wait=0ms service=18ms status=500 bytes=643
2012-09-06T02:22:06+00:00 app[web.1]: 
2012-09-06T02:22:06+00:00 heroku[router]: GET whispering-atoll-2029.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=6ms status=304 bytes=0

Reading from the logs: 从日志中读取:

/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.2.0/lib/bundler/rubygems_integration.rb:147:in block in replace_gem': Please install the postgresql adapter: gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.) (LoadError) /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.2.0/lib/bundler/rubygems_integration.rb:147:in block in replace_gem': Please install the postgresql adapter: gem install activerecord-postgresql-adapter `(pg不属于捆绑包。将其添加到Gemfile中。)(LoadError)

Heroku uses postgres to connect to the database (not sqlite), so add a production group including postgres gem Heroku使用postgres连接到数据库(不是sqlite),因此添加包括postgres gem的生产组

group :production do
    gem 'pg'
end

This tells bundler that on production, install the pg gem (which Heroku wants). 这告诉捆绑器,在生产时,安装pg gem(Heroku想要的)。


Update: 更新:

For your second problem. 对于您的第二个问题。 From the logs again: 再次从日志中:

2012-09-06T02:22:00+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: foundation/common/ratios. 2012-09-06T02:22:00+00:00 app[web.1]: 6: 2012-09-06T02:22:00 + 00:00 app [web.1]:ActionView :: Template :: Error(找不到导入文件或文件不可读:Foundation / common / ratios。2012-09-06T02:22: 00 + 00:00 app [web.1]:6:
Timetracker 2012-09-06T02:22:00+00:00 app[web.1]: Timetracker 2012-09-06T02:22:00 + 00:00 app [web.1]:
7: 2012-09-06T02:22:00+00:00 app[web.1]: Load path: /app 2012-09-06T02:22:00+00:00 app[web.1]: 7:2012-09-06T02:22:00 + 00:00 app [web.1]:加载路径:/ app 2012-09-06T02:22:00 + 00:00 app [web.1]:
9: <%= stylesheet_link_tag "application", :media => "all" %> 2012-09-06T02:22:00+00:00 app[web.1]: (in /app/app/assets/stylesheets/foundation_and_overrides.scss)): 2012-09-06T02:22:00+00:00 app[web.1]: 10: <%= javascript_include_tag "application" %> 2012-09-06T02:22:00+00:00 app[web.1]: 8: 2012-09-06T02:22:00+00:00 app[web.1]: 11: <%= csrf_meta_tags %> 2012-09-06T02:22:00+00:00 app[web.1]: 12: 2012-09-06T02:22:00+00:00 app[web.1]: 9:<%= stylesheet_link_tag“ application”,:media =>“ all”%> 2012-09-06T02:22:00 + 00:00 app [web.1] :(在/ app / app / assets / stylesheets / foundation_and_overrides.scss)):2012-09-06T02:22:00 + 00:00 app [web.1]:10:<%= javascript_include_tag“ application”%> 2012-09-06T02:22:00 + 00:00 app [web.1]:8:2012-09-06T02:22:00 + 00:00 app [web.1]:11:<%= csrf_meta_tags%> 2012-09-06T02:22:00 + 00:00 app [web.1]:12:2012-09-06T02:22:00 + 00:00 app [web.1]:
app/assets/stylesheets/foundation_and_overrides.scss:1 2012-09-06T02:22:00+00:00 app[web.1]: app / assets / stylesheets / foundation_and_overrides.scss:1 2012-09-06T02:22:00 + 00:00 app [web.1]:
app/views/layouts/application.html.erb:9:in `_app_views_layouts_application_html_erb__3480637122833364973_39068600' app / views / layouts / application.html.erb:9:在“ _app_views_layouts_application_html_erb__3480637122833364973_39068600”中

That's the sass file: foundation_and_overrides.scss . 那是sass文件: foundation_and_overrides.scss First, the postfixes are not in asset-pipeline form . 首先,后缀不是资产流水线形式的 Also, in that file, the imports refer to missing files. 同样,在该文件中,导入是指丢失的文件。

TL;DR: Spend some time to read the output logs! TL; DR:花些时间阅读输出日志! Most things will complain there if it fails ;) 如果失败,大多数事情都会抱怨;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM