Hello again,
Browsing a bit more I stumbled on a suggestion to install yet another gem:
postgres. This gem doesn't even install:
$ gem install postgres
Fetching: postgres-0.7.9.2008.01.28.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing postgres:
ERROR: Failed to build gem native extension.
/home/desousa/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
extconf.rb:4:in `<main>': uninitialized constant Object::PLATFORM
(NameError)
Gem files will remain installed in
/home/desousa/.rvm/gems/ruby-1.9.2-p290/gems/postgres-0.7.9.2008.01.28 for
inspection.
Results logged to
/home/desousa/.rvm/gems/ruby-1.9.2-p290/gems/postgres-0.7.9.2008.01.28/ext/gem_make.out
What's the issue with this particular gem?
So far I tried 3 different gems for postgres adapter, each recommended at
different places on the web. Is there an "official" Rails gem for postgres?
Or an "official" adapter install guide?
Thank you,
Luís
2011/10/4 Luís de Sousa <[email protected]>
> Hello everyone. I'm starting with Rails going through the obvious
> "Getting Started with Rails" guide:
>
> http://guides.rubyonrails.org/getting_started.html
>
> Everything goes smoothly until the rake db:create command, which
> returns this strange error message referring to a gem that apparently
> doesn't exist:
>
> Please install the postgresql adapter: `gem install activerecord-
> postgresql-adapter` (pg is not part of the bundle. Add it to Gemfile.)
>
> I am trying to connect to a remote postgres server with the following
> contents in database.yml:
>
> common: &common
> adapter: postgresql
> host: the_server
> database: my_db
> encoding: unicode
> pool: 5
> timeout: 5000
> username: me
> password: mypass
>
> development:
> <<: *common
>
> test:
> <<: *common
>
> production:
> <<: *common
>
> Which only adds the host line to what is shown in the tutorial.
>
> After confirming that the pg gem is installed I tried two things:
> first install the libdbd-pg-ruby package for Ubuntu, and then replaced
> the pg gem for postgres-pr, as suggested here:
>
>
> http://stackoverflow.com/questions/3347537/please-install-the-postgresql-adapter-gem-install-activerecord-postgresql-adapt
>
> Neither of these actions changed matters, the error remains. What else
> can I do to trace this problem?
>
> Thank you,
>
> Luís
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.