我正在关注在线railstutorial。 我是新手,现在我完成了我的第二个应用程序。 它可以在本地机器上正常工作,但是我对heroku有问题。 我推我的应用程序成功完成,然后我做了Heroku的耙分贝:迁移 但我看到my pageheroku上的应用程序错误
在应用程序中出现错误,你的页面无法 担任此错误。请稍后重试。如果您是应用 所有者,请检查您的日志信息
而且我看到在命令行这样的警告:
耙中止!请安装PostgreSQL的适配器:
gem install activerecord-postgresql-adap ter
(PG不是包的一部分添加 它的Gemfile。)
我谷歌这个错误,我发现我需要添加此字符串来我的Gemfile:
宝石 '的sqlite3',:组=>:发展 宝石 'PG',:组=>:生产
做到了,并且重试,但什么都没有改变,我仍然有这个在我的命令行
请安装postgresql适配器:
gem install activerecord-postgresql-adap ter
(pg不是捆绑软件的一部分。将它添加到 Gemfile中。)
我无法理解这一点,因为我defenitely有PG宝石,我可以看到我的本地机器
Using thor (0.14.6)
Using railties (3.2.1)
Using coffee-rails (3.2.2)
Using jquery-rails (2.0.2)
Using pg (0.13.2)
Using rails (3.2.1)
Using sass (3.1.16)
Using sass-rails (3.2.5)
Using sqlite3 (1.3.6)
Using uglifier (1.2.4)
他的安装,但我可以” t看到相同,当捆绑安装在Heroku服务器上
Installing thor (0.14.6)
Installing railties (3.2.1)
Installing coffee-rails (3.2.2)
Installing jquery-rails (2.0.2)
Using bundler (1.0.7)
Installing rails (3.2.1)
Installing sass (3.1.16)
Installing sass-rails (3.2.5)
Installing uglifier (1.2.4)
我该如何解决它?真的不知道。请帮帮我。
顺便说一句,我的英语水平很抱歉,我从俄罗斯是)
更新: 是的,我看到它运行捆绑安装--without发展,但我的Gemfile现在看起来像:
group :production do
gem 'pg'
end
group :development, :test do
gem 'sqlite3-ruby', :require => 'sqlite3'
end
,你可以看到,“PG”肯定是出开发组,但Heroku上并没有安装它
你有没有解决这个问题? – Laser 2012-05-22 16:51:53