Hi all,

I installed Rails 3.0 + PostgreSQL 8.4.
Installed the gem postgre-pr
I added " gem 'postgres-pr' " to my Gemfile
I defined my database.yml with:
# PostgreSQL 8.4
development:
adapter: postgresql
encoding: unicode
database: testdb
pool: 5
username: test
password: ******

I run rails server which starts, but application environment returns
this error:
no such file to load -- pg

Any idea about where this comes from ?

Thanks for help !

Fred

--
Posted via http://www.ruby-forum.com/.

--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Botp at Oct 26, 2011 at 3:47 pm

    2011/10/26 Frédéric Champreux <lists@ruby-forum.com>:
    no such file to load -- pg
    gem install pg

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Rajinder Yadav at Oct 27, 2011 at 5:50 am

    On 11-10-26 11:38 AM, Frédéric Champreux wrote:
    Hi all,

    I installed Rails 3.0 + PostgreSQL 8.4.
    Installed the gem postgre-pr
    I added " gem 'postgres-pr' " to my Gemfile
    I defined my database.yml with:
    # PostgreSQL 8.4
    development:
    adapter: postgresql
    encoding: unicode
    database: testdb
    pool: 5
    username: test
    password: ******

    I run rails server which starts, but application environment returns
    this error:
    no such file to load -- pg

    Any idea about where this comes from ?

    Thanks for help !

    Fred
    You will need to locate where pg_config is installed, if you are on
    linux then you can type:

    $ which pg_config
    /usr/local/pgsql/bin/pg_config

    Plug that into gem install command like this:

    sudo gem install pg -- --with-pg-config=/usr/local/pgsql/bin/pg_config

    Also in your database.yml, you should also add (for local development)

    host: localhost


    --
    Kind Regards,
    Rajinder Yadav | http://DevMentor.org | Do Good! ~ Share Freely

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Peter Vandenabeele at Oct 27, 2011 at 7:45 am

    On Thu, Oct 27, 2011 at 7:43 AM, Rajinder Yadav wrote:
    On 11-10-26 11:38 AM, Frédéric Champreux wrote:

    Hi all,

    I installed Rails 3.0 + PostgreSQL 8.4.
    Installed the gem postgre-pr
    I added " gem 'postgres-pr' " to my Gemfile
    I defined my database.yml with:
    # PostgreSQL 8.4
    development:
    adapter: postgresql
    encoding: unicode
    database: testdb
    pool: 5
    username: test
    password: ******

    I run rails server which starts, but application environment returns
    this error:
    no such file to load -- pg

    Any idea about where this comes from ?

    Thanks for help !

    Fred
    You will need to locate where pg_config is installed, if you are on linux
    then you can type:

    $ which pg_config
    /usr/local/pgsql/bin/pg_config

    Plug that into gem install command like this:

    sudo gem install pg -- --with-pg-config=/usr/local/**pgsql/bin/pg_config

    Also in your database.yml, you should also add (for local development)

    host: localhost
    At least on UNIX, for local development, a host: is not always required.

    One can also connect over a local Unix-domain socket, possibly without
    a password (because already authenticated to the Operating System).
    The detailed setting of access rights for these 2 cases is covered in the
    file /etc/postgresql/8.4/main/pg_hba.conf.

    HTH,

    Peter

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Frédéric Champreux at Oct 28, 2011 at 8:26 am

    Rajinder Yadav wrote in post #1028746:
    On 11-10-26 11:38 AM, Frdric Champreux wrote:
    database: testdb
    Thanks for help !

    Fred
    You will need to locate where pg_config is installed, if you are on
    linux then you can type:

    $ which pg_config
    /usr/local/pgsql/bin/pg_config

    Plug that into gem install command like this:

    sudo gem install pg -- --with-pg-config=/usr/local/pgsql/bin/pg_config

    Also in your database.yml, you should also add (for local development)

    host: localhost


    --
    Kind Regards,
    Rajinder Yadav | http://DevMentor.org | Do Good! ~ Share Freely
    Well, thanks for your help !
    Indeed, I had to install libpq-dev, locate pg_config, and then the pg
    gem.
    It's my first try with PostgreSQL, and I not sure to understand why the
    postgre-pr gem was not sufficient ?
    But it works fine now !
    Thanks for your help !
    Best regards,
    Fred

    --
    Posted via http://www.ruby-forum.com/.

    --
    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 rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedOct 26, '11 at 3:38p
activeOct 28, '11 at 8:26a
posts5
users4
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase