的Rails的Heroku应用程序错误
我尝试我的Rails应用程序推送到Heroku的,但遇到了以下错误
的Rails的Heroku应用程序错误
Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
因为我使用的sqlite3
在web显示一个搜索我应该做到以下几点
heroku rake db:create
heroku rake db:migrate
Heroku的耙分贝:创建抱怨
命令gem install activerecord-postgresql-adapter
失败,抱怨
ERROR: Could not find a valid gem 'activerecord-postgresql-adapter' (>= 0) in any repository
ERROR: Possible alternatives: activerecord-postgis-adapter, activerecord-jdbcpostgresql-adapter, activerecord-postgresql-cursors, activerecord-jdbcmysql-adapter, activerecord-jdbcmssql-adapter
然后我又在网上搜索,并遵循http://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development建议改变
gem 'sqlite3'
到
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
end
和运行
bundle install --without production
然而这并没有解决另一个来源说,我需要做的像
group :production do
gem 'therubyracer-heroku', '0.8.1.pre3'
gem "pg"
end
这也没能解决问题
我有我的系统上安装postresql问题 。 那到底是什么问题?
这里的关键是,pg
宝石需要对你最终使用Postgres数据库运行时部署到Heroku的(http://devcenter.heroku.com/articles/database)
理想情况下,您希望在本地运行Postgres,以便从数据库的角度看,开发和生产之间没有任何差异。
如果你想坚持的事情,你如何拥有他们只需将gem "pg"
添加到您的Gemfile应该解决这个问题。
添加完毕后,运行:
bundle install
git add .
git commit -am "Added PG to Gemfile"
git push heroku master
heroku rake db:migrate
我完全听从你的指示。网页现在从应用程序错误更改为我们很抱歉,但出错了。 我们已收到有关此问题的通知,我们会尽快查看。 ------这是什么意思?这是我的问题或heroku的问题? – user1143669 2012-01-16 19:34:01
你的日志里有什么? 'heroku日志' – 2012-01-16 21:55:36
首先请从Gemfile中取出宝石= 'sqlite3的',添加宝石= 'PG'
运行此命令在项目路径:捆绑安装
git add。
git的承诺-am “创业板文件中添加PG”
混帐推Heroku的主
没有这个不断得到解决? – Laser 2012-05-22 16:53:04