我已经完成了一个示例rails项目,它在本地运行完美,但是当我推送到heroku时,收到了一些错误。 An error occurred in the application and your page could not be served. Please try again in a few moments.
我做了一些研究,但似乎无关,任何人都可以提供帮助吗?提前谢谢。
Heroku记录
Snailwalkers-MacBook-Pro:sample_app snailwalker$ heroku logs
2014-09-07T17:14:54.270914+00:00 heroku[api]: Release v2 created by leevn2011@hotmail.com
2014-09-07T17:14:54.270821+00:00 heroku[api]: Enable Logplex by leevn2011@hotmail.com
2014-09-07T17:16:01+00:00 heroku[slug-compiler]: Slug compilation started
2014-09-07T17:16:37.541623+00:00 heroku[api]: Scale to web=1 by leevn2011@hotmail.com
2014-09-07T17:16:38.287774+00:00 heroku[api]: Release v3 created by leevn2011@hotmail.com
2014-09-07T17:16:38.287700+00:00 heroku[api]: Set DATABASE_URL config vars by leevn2011@hotmail.com
2014-09-07T17:16:38.406089+00:00 heroku[api]: Release v4 created by leevn2011@hotmail.com
2014-09-07T17:16:38.406016+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_RED resource by leevn2011@hotmail.com
2014-09-07T17:16:38.586555+00:00 heroku[api]: Set LANG, RAILS_ENV, RACK_ENV config vars by leevn2011@hotmail.com
2014-09-07T17:16:38.586638+00:00 heroku[api]: Release v5 created by leevn2011@hotmail.com
2014-09-07T17:16:38.715696+00:00 heroku[api]: Deploy 406924e by leevn2011@hotmail.com
2014-09-07T17:16:38.715696+00:00 heroku[api]: Release v6 created by leevn2011@hotmail.com
2014-09-07T17:16:38+00:00 heroku[slug-compiler]: Slug compilation finished
2014-09-07T17:16:45.515573+00:00 app[web.1]: bundler: command not found: unicorn
2014-09-07T17:16:45.515601+00:00 app[web.1]: Install missing gem executables with `bundle install`
2014-09-07T17:16:46.292609+00:00 heroku[web.1]: Process exited with status 127
2014-09-07T17:16:46.297885+00:00 heroku[web.1]: State changed from starting to crashed
2014-09-07T17:16:46.298542+00:00 heroku[web.1]: State changed from crashed to starting
2014-09-07T17:16:48.892432+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 22348 -c ./config/unicorn.rb`
2014-09-07T17:16:49.855904+00:00 app[web.1]: bundler: command not found: unicorn
2014-09-07T17:16:49.855922+00:00 app[web.1]: Install missing gem executables with `bundle install`
2014-09-07T17:16:50.647495+00:00 heroku[web.1]: Process exited with status 127
2014-09-07T17:16:53.432594+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dry-reaches-6872.herokuapp.com request_id=cb7f47c6-3623-4325-9cde-28681b28fc67 fwd="54.234.54.24" dyno= connect= service= status=503 bytes=
2014-09-07T17:17:08.225697+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by leevn2011@hotmail.com
2014-09-07T17:17:11.723758+00:00 heroku[run.2079]: Awaiting client
2014-09-07T17:17:11.982257+00:00 heroku[run.2079]: Starting process with command `bundle exec rake db:migrate`
2014-09-07T17:17:12.116498+00:00 heroku[run.2079]: State changed from starting to up
2014-09-07T17:17:15.969919+00:00 heroku[run.2079]: State changed from up to complete
2014-09-07T17:17:15.948682+00:00 heroku[run.2079]: Process exited with status 0
2014-09-07T17:17:54.522538+00:00 heroku[api]: Scale to web=1 by leevn2011@hotmail.com
2014-09-07T17:18:12.221123+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dry-reaches-6872.herokuapp.com request_id=cf43e645-6bce-419c-98cd-c7859d5ef695 fwd="223.207.119.11" dyno= connect= service= status=503 bytes=
2014-09-07T17:26:31+00:00 heroku[slug-compiler]: Slug compilation started
2014-09-07T17:26:43+00:00 heroku[slug-compiler]: Slug compilation finished
2014-09-07T17:26:43.475754+00:00 heroku[api]: Deploy 843cecf by leevn2011@hotmail.com
2014-09-07T17:26:43.475810+00:00 heroku[api]: Release v7 created by leevn2011@hotmail.com
2014-09-07T17:26:43.654369+00:00 heroku[web.1]: State changed from crashed to starting
2014-09-07T17:26:47.715857+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 36591 -c ./config/unicorn.rb`
2014-09-07T17:26:49.439438+00:00 app[web.1]: Install missing gem executables with `bundle install`
2014-09-07T17:26:49.439417+00:00 app[web.1]: bundler: command not found: unicorn
2014-09-07T17:26:50.119467+00:00 heroku[web.1]: Process exited with status 127
2014-09-07T17:26:50.129566+00:00 heroku[web.1]: State changed from starting to crashed
2014-09-07T17:26:51.069339+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dry-reaches-6872.herokuapp.com request_id=1635689f-1243-4c26-911c-f3852dd853a1 fwd="54.234.54.24" dyno= connect= service= status=503 bytes=
2014-09-07T17:27:14.043732+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by leevn2011@hotmail.com
2014-09-07T17:27:17.785538+00:00 heroku[run.1582]: Awaiting client
2014-09-07T17:27:17.997789+00:00 heroku[run.1582]: State changed from starting to up
2014-09-07T17:27:18.059318+00:00 heroku[run.1582]: Starting process with command `bundle exec rake db:migrate`
2014-09-07T17:27:21.299414+00:00 heroku[run.1582]: Process exited with status 0
2014-09-07T17:27:21.309418+00:00 heroku[run.1582]: State changed from up to complete
2014-09-07T17:27:36.272239+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dry-reaches-6872.herokuapp.com request_id=5a71db66-a549-47f5-9604-9d7bf2176276 fwd="223.207.119.11" dyno= connect= service= status=503 bytes=
database.yml文件
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On OS X with Homebrew:
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
# On OS X with MacPorts:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
#
# Configure Using Gemfile
# gem 'pg'
#
default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 5
development:
<<: *default
database: devep00
# The specified database role being used to connect to postgres.
# To create additional roles in postgres see `$ createuser --help`.
# When left blank, postgres will use the default role. This is
# the same name as the operating system user that initialized the database.
#username: ruby-getting-started
# The password associated with the postgres role (username).
#password:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost
# The TCP port the server listens on. Defaults to 5432.
# If your server runs on a different port number, change accordingly.
#port: 5432
# Schema search path. The server defaults to $user,public
#schema_search_path: myapp,sharedapp,public
# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# Defaults to warning.
#min_messages: notice
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: testp00
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
#
# Instead, provide the password as a unix environment variable when you boot
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
#
# You can use this database configuration with:
#
# production:
# url: <%= ENV['DATABASE_URL'] %>
#
production:
<<: *default
database: production2014
username: ruby-getting-started
password: <%= ENV['RUBY-GETTING-STARTED_DATABASE_PASSWORD'] %>