Installing pg -v 0.17.1
Looks like you are missing pre-requisite libraries.
sudo apt-get install libpq-dev postgresql-devel
Then install pg
gem install pg
gem install pg -v '0.17.1' not working for some reason
I had some problem same as you when i installed gem 'pg'
on centos
or ubuntu
.
For centos, you can do this:
yum install postgresql-libs
yum install postgresql-devel
Then run gem install pg
again.
An error occurred while installing pg (0.17.1), and Bundler cannot continue
I'm on a Mac running Mavericks. My solution was to install Postgres.
And then in terminal install using homebrew with the configuration:
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
Note: This answer has been edited to use the latest
symlink that is currently included in shipping versions of the Postgres app.
Previous versions suggested:
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config
Could not find pg-0.17.1 in any of the sources
An alternative solution: Download the postgresql.app:
Create or modify the config/database.yml
file, adding the following configuration:
development:
adapter: postgresql
encoding: unicode
database: name_of_app_development
pool: 5
Error updating pg gem from 0.17.0 to 0.17.1 for Mac OS X 10.9.1
The easiest way is to install Postgres.app.
Then do:
$ gem install pg -v '0.17.1' && bundle update
Edit: Do not forget to add the relevant directories into your PATH
.
Not able to run the RoR project using rails s. Could not find pg-0.17.1 in any of the sources
The error message says "Can't find the 'libpq-fe.h header"
Try installing libpq-dev
sudo apt-get install libpq-dev
Rails - Gem Error while installing pg (1.1.3), and Bundler cannot continue
try instaling with pg-config like this:gem install pg -v 1.1.3 -- --with-pg-config=/usr/pgsql-9.X/bin/pg_config
.
In pg-config path mention the posgtres version installed in you're system.
Related Topics
How to Click on a Specific Coordinates of an Element
How to Convert a Ruby String with Brackets to an Array
Ruby on Rails 4 Select Multiple
Authlogic and Multiple Sessions for the Same User
Ruby: Method Inexplicably Overwritten and Set to Nil
How to Execute Windows Cli Commands in Ruby
If 'Main' Is an Instance of 'Object', Why Can't I Call It
Add Existing Classes into a Module
How to Get the Array Index or Iteration Number with an Each Iterator
How to Write to File When Using Marshal::Dump in Ruby for Object Serialization
Bootstrap Datepicker Default Value Simple_Form_For
Ruby: How to Find the Key of the Largest Value in a Hash
How to Find If Range Is Contained in an Array of Ranges
Does Ruby 1.9.2 Have an Is_A? Function
No Such File to Load -- SQLite3/Sqlite3_Native
Does Ruby Have Any Number Formatting Classes
In Ruby/Rails, How to Sort on a Date Value Where the Date Can Sometimes Be Null