Ho appena eseguito l'upgrade a Rails 3.1 e la prima app che ho provato a distribuire su Heroku ha riscontrato un problema relativo all'adattatore Postgres. Sono in grado di spingere l'applicazione per Heroku, ma poi quando provo a migrare il database ottengo il seguente errore:Rails 3.1 - Pushing to Heroku - Errori durante l'installazione dell'adattatore Postgres?
Heroku rake db: migrate
rake aborted!
Please install the postgresql adapter: `gem install activerecord-postgresql-adapter`
(pg is not part of the bundle. Add it to Gemfile.)
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
quando provo il loro suggerite Installare ottengo:
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
che sembra già strano ... così che cosa gioiello esatta dovrei installare per ottenere questa cosa di lavoro, se non quello che dicono che dovrei installare ??
Quando provo l'installazione gioiello pg ottengo:
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/jerometufte/.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.
Provided configuration options:
--with-opt-dir
...
sto utilizzando SQLite3 attualmente. Qualsiasi aiuto molto apprezzato, questo mi sconcerta.
Come impostare PostgreSQL per Rails e Heroku http: // robdodson .me/blog/2012/04/27/how-to-setup-postgresql-for-rails-and-heroku/ –