私はherokuでテストしたいレールアプリを持っています。私はレール3.1.3を使用しています、そして、私はヒロクのデータベースをレーキにすることはできません。しかし、アプリを押してもうまく動作します。私はHerokuのすくいデシベルをしようとすると:私はエラーを取得する移行:Herokuアプリケーションがpostgresqlアダプタを見つけられません。Rake db:Rails 3.1.3で移行してください
rake aborted! Please install the postgresql adapter:
gem install activerecord-postgresql-adapter
(pg is not part of the bundle. Add it to Gemfile.)
私はGemfileに宝石「PG」を追加してみました。あなたはGemfileに追加した
::私はHerokuのにアプリをプッシュするときに、私はエラーを取得する * PG FAILED:http://devcenter.heroku.com/articles/bundler ! Herokuプッシュが拒否され、Bundler経由で宝石のインストールに失敗しました
私はなぜそれがインストールされないのか分からないので、ローカルにインストールして問題があるかどうかを確認しました。 。私はRVMを使用してインストールをバンドルしようとします。
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/username/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying
anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
** more lines that are unimportant **
em files will remain installed in /Users/username/.rvm/gems/[email protected]/gems/pg-0.13.1 for inspection. Results logged to /Users/username/.rvm/gems/[email protected]/gems/pg-0.13.1/ext/gem_make.out An error occured while installing pg (0.13.1), and Bundler cannot continue. Make sure that
gem install pg -v '0.13.1'
succeeds before bundling.
何が起こっているのですか?私はこのエラーを修正する方法を理解できないようです。
Mac(os x snow leopard)のパッケージが何であるか知っていますか?驚くべき指針があれば。私はlibpqについて聞いたことがありません – jay
私はpg gemのインストールを可能にするコードを見つけることができました:PATH = $ PATH:/Library/PostgreSQL/9.1/bin sudo gem install pg – jay
しかし私のrvm gemsetにはインストールされません。どうして? – jay