@H_404_1@我试图部署到heroku.
Rails 3.1.0.rc4,
我从Heroku日志中收到以下错误:
Starting process with command: `thin -p 48902 -e production -R /home/heroku_rack/heroku.ru start` 2011-06-20T11:25:44+00:00 app[web.1]: /app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `rescue in establish_connection': Please install the postgresql adapter: `gem install activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.) (RuntimeError)
我试图安装activerecord-postgresql-adapter,但是我收到这个错误:
Could not find gem 'activerecord-postgresql-adapter (>= 0)' in any of the gem sources listed in your Gemfile.
宝石’
这产生了这个错误:
Installing pg (0.11.0) with native extensions /Users/imac/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
有任何想法吗?
解决方法
你的电脑上安装了
PostgreSQL吗?如果不先安装它,那么安装pg宝石.
# gemfile group :production do gem 'therubyracer-heroku','0.8.1.pre3' # you will need this too gem 'pg' end