2013-04-02 29 views
0

我试图推动我的第一个rails项目到heroku。但我收到“应用程序错误”: 应用程序发生错误,您的页面无法送达。请稍后重试。 如果您是应用程序所有者,请查看日志以获取详细信息。在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 [email protected] 
←[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

可能有其他问题怎么回事...但这可能是你的问题之一:'请安装postgresql适配器:gem install activerecord-postgresql-a dapter(pg不是pa捆绑的rt。将它添加到Gemfile中。)(LoadError)' – summea

+0

但我没有在我的项目中使用Postgre。我使用MySQL。 – Gabi

+0

你使用远程MySQL数据库吗?也许这可以帮助:http://stackoverflow.com/questions/5397028/remote-mysql-database-on-heroku-app – Pigueiras

回答

2

你看到它的错误信息:

Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` 
(pg is not part of the bundle. Add it to Gemfile.) 
+0

并请发布您的database.yml – Lichtamberg

+0

非常感谢您,我将database.yml'mysql2'更改为'postgresql'并添加到gemfile“gem'activerecord-postgresql-adapter'”中。现在它起作用了。所以我不能在heroku上使用mysql数据库? – Gabi

+0

我认为heroku只使用postgres .. – Lichtamberg

0

这也是最好有类似下面组。

样品的Gemfile:

发展集团:sqlite3的,因为它不要求相比,PostgreSQL的

group :development do 
    gem 'sqlite3' 
end 

生产集团

任何任何数据库安装过程
group :production do 
    gem 'pg' 
end 
相关问题