我试图将我的第一个rails项目推送到heroku。但我得到“应用程序错误”: 应用程序中发生错误,无法提供您的页面。请稍后重试。 如果您是应用程序所有者,请检查日志以获取详细信息。
我无法理解错误是什么。我的日志:
C:\Sites\calend>heroku logs
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from script/rails:6:in `<main>'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from script/rails:6:in `require'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/config/environment.rb:
5:in `<top (required)>'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/engine.rb:587:in `each'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in
require'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initialize
rs'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/engine.rb:587:in `block in <class:Engine>'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
←[36m2013-04-02T16:43:48+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
←[36m2013-04-02T16:43:50+00:00 heroku[web.1]:←[0m Process exited with status 1
←[36m2013-04-02T16:43:50+00:00 heroku[web.1]:←[0m State changed from starting to
crashed
←[36m2013-04-02T16:54:08+00:00 heroku[web.1]:←[0m State changed from crashed to
starting
←[36m2013-04-02T16:54:10+00:00 heroku[web.1]:←[0m Starting process with command
`bundle exec rails server -p 53576`
←[36m2013-04-02T16:54:13+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rai
ls 2.3-style plugins in vendor/plugins! Support for these plugins will be remove
d in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in t
o your app as lib/myplugin/* and config/initializers/myplugin.rb. See the releas
e notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-r
c2-has-been-released. (called from <top (required)> at /app/config/environment.r
b:5)
←[36m2013-04-02T16:54:13+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rai
ls 2.3-style plugins in vendor/plugins! Support for these plugins will be remove
d in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in t
o your app as lib/myplugin/* and config/initializers/myplugin.rb. See the releas
e notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-r
c2-has-been-released. (called from <top (required)> at /app/config/environment.r
b:5)
←[36m2013-04-02T16:54:13+00:00 app[web.1]:←[0m DEPRECATION WARNING: You have Rai
ls 2.3-style plugins in vendor/plugins! Support for these plugins will be remove
d in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in t
o your app as lib/myplugin/* and config/initializers/myplugin.rb. See the releas
e notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-r
c2-has-been-released. (called from <top (required)> at /app/config/environment.r
b:5)
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m => Rails 3.2.1 application starti
ng in production on http://0.0.0.0:53576
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m => Booting WEBrick
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m => Ctrl-C to shutdown server
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_depe
ndency'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connec
tion_specification.rb:25:in `spec'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m Exiting
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m /app/vendor/bundle/ruby/1.9.1/gem
s/bundler-1.3.2/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem
': Please install the postgresql adapter: `gem install activerecord-postgresql-a
dapter` (pg is not part of the bundle. Add it to Gemfile.) (LoadError)
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m => Call with -d to detach
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connec
tion_specification.rb:127:in `establish_connection'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:36:in `instanc
e_eval'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connec
tion_specification.rb:48:in `resolve_hash_connection'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.
1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connect
ion_specification.rb:39:in `resolve_string_connection'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:36:in `execute
_hook'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in
require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activerecord-3.2.1/lib/active_record/railtie.rb:76:in `block (2 levels)
in <class:Railtie>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_depe
ndency'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/devise-2.2.3/lib/devise/orm/active_record.rb:3:in `<top (required)>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in
require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/postgresql_adap
ter.rb:6:in `<top (required)>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/devise-2.2.3/lib/devise.rb:258:in `setup'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/config/initializers/de
vise.rb:3:in `<top (required)>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/config/initializers/de
vise.rb:16:in `block in <top (required)>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:42:in `run_loa
d_hooks'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:42:in `each'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activerecord-3.2.1/lib/active_record/base.rb:716:in `<top (required)>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:43:in `block i
n run_load_hooks'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/engine.rb:588:in `block (2 levels) in <class:En
gine>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/engine.rb:587:in `block in <class:Engine>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `instance_exec'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `load'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:245:in `block in
load'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_depe
ndency'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in `block in run_initialize
rs'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in `run'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/config/environment.rb:
5:in `<top (required)>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `block in
require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/application.rb:136:in `initialize!'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/engine.rb:587:in `each'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `each'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/config.ru:3:in `block
in <main>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in `run_initializers'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in `load_depe
ndency'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in `app'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/config.ru:in `<main>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/config.ru:in `new'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from script/rails:6:in `<main>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from script/rails:6:in `require'
←[36m2013-04-02T16:54:15+00:00 app[web.1]:←[0m from /app/vendor/bundle/ruby/1.9
.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
←[36m2013-04-02T16:54:16+00:00 heroku[web.1]:←[0m Process exited with status 1
←[36m2013-04-02T16:54:16+00:00 heroku[web.1]:←[0m State changed from starting to
crashed
←[33m2013-04-02T16:58:52+00:00 heroku[api]:←[0m Starting process with command `b
undle exec rake -T` by aigool@mail.ru
←[32m2013-04-02T16:58:54+00:00 heroku[run.1117]:←[0m Awaiting client
←[32m2013-04-02T16:58:54+00:00 heroku[run.1117]:←[0m Starting process with comma
nd `bundle exec rake -T`
←[32m2013-04-02T16:58:56+00:00 heroku[run.1117]:←[0m State changed from starting
to up
←[32m2013-04-02T16:59:00+00:00 heroku[run.1117]:←[0m Process exited with status
0
←[32m2013-04-02T16:59:00+00:00 heroku[run.1117]:←[0m State changed from up to co
mplete
答案 0 :(得分:2)
您会在错误消息中看到它:
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter`
(pg is not part of the bundle. Add it to Gemfile.)
答案 1 :(得分:0)
拥有以下群体也更好。
示例Gemfile:
开发组:sqlite3因为与postgresql相比它不需要任何数据库设置过程
group :development do
gem 'sqlite3'
end
生产小组
group :production do
gem 'pg'
end