我有一个RoR应用程序在我的本地计算机上工作,但当我将它发送到heroku时,它崩溃了.错误日志给出错误H10并说:
2012-11-21T15:26:47+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.4.2/lib/new_relic/control/instance_methods.rb:95:in `start_agent'
2012-11-21T15:26:48+00:00 heroku[web.1]: State changed from starting to crashed
2012-11-21T15:26:48+00:00 heroku[web.1]: Process exited with status 1
2012-11-21T15:26:59+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
2012-11-21T15:27:00+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
2012-11-21T15:30:08+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=xxx.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
2012-11-21T15:30:08+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico …Run Code Online (Sandbox Code Playgroud) 我第一次尝试将我的rails应用程序部署到Heroku,遇到了很多问题.应用程序崩溃,您可以查看映像中的日志:http
://i.stack.imgur.com/bsx1b.png
更糟糕的是,当我尝试在本地查看我的应用程序时,它无法在postgreSQL环境中工作当我回到database.yml中使用sqLite3时工作正常.我认为问题可能是我实际上必须安装postgreSQL,除了添加pg gem和运行bundle install.
我继续使用一键安装程序(Windows 7 64位)安装PostgreSQL.重启后,一个简单的rails服务器或bundle install命令开始失败,所以我重新安装了整个ruby和rails.
现在rails server命令工作正常,当我尝试在本地环境中查看我的应用程序时,它会提示不同的错误.所以现在我有pgAdmin III和Rails
PG::Error
fe_sendauth: no password supplied
Run Code Online (Sandbox Code Playgroud)
我试着遵循这个,但我找不到"pg_hba.conf".我想答案是基于不同的操作系统.
而现在再次,捆绑器不工作,给我错误......
问题: 1)使用一键安装程序安装postgreSQL是否正确?因为这导致我的ROR以某种方式"崩溃",我不得不重新安装rails.2)我想我将删除与postgreSQL相关的所有内容,重新安装Rails,并从头开始.我必须采取哪些步骤?我看过的所有参考文献似乎都不适合Windows环境.
在我的gemfile中,我有
gem 'pg'
gem 'thin'
Run Code Online (Sandbox Code Playgroud)
在我的数据库中,我有
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: postgresql
encoding: utf8
database: mangfeel_development
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your …Run Code Online (Sandbox Code Playgroud)