The package cannot be installed

After I cloned the repo from bitbucket

, to bundle install

, I am getting below error.

Gem :: Ext :: BuildError: ERROR: Failed to create custom gem extension.

An error occurred while installing pg (0.18.2) and Bundler cannot continue. Make sure to do gem install pg -v '0.18.2'

well before tying.

when i tried to install gem install pg -v '0.18.2'

i get this.

ERROR: Error installing pg:

ERROR: Failed to create custom gem extension.

Help with a successful package installation

+3


source to share


2 answers


You need to have the PostgreSQL libraries and build the basics to compile your own PG extension.

For PostgreSQL libraries

sudo apt-get install libpq-dev

      



To create essentials

sudo apt-get install build-essential 

      

Assuming you are on an ubuntu machine

+1


source


I see you have been working with RoR for a while now, so you have a development environment customized to your liking, but I highly recommend ThoughtBot (the creator of FactoryGirl and PaperClip) for a very simple (it couldn't be easier) development.

This is a script for OS X that configures Postgres, Foreman, Heroku Toolbelt, ImageMagick, Rbenv, Redis, Tmux, and more. Don't worry, as it will automatically skip over what you've already installed.

To install Thoughtbot setup, run the script below:



curl --remote-name https://raw.githubusercontent.com/thoughtbot/laptop/master/mac
less mac
sh mac 2>&1 | tee ~/laptop.log

      

For more information visit https://github.com/thoughtbot/laptop

+1


source







All Articles