Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bundle fails for installation

After I cloned a repo from bitbucket, on bundle install I am getting below error.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

An error occurred while installing pg (0.18.2), and Bundler cannot continue. Make sure that gem install pg -v '0.18.2' succeeds before bundling.

when I tried to install gem install pg -v '0.18.2', I get this.

ERROR: Error installing pg:

ERROR: Failed to build gem native extension.

Please help in successful bundle instllation

like image 764
Suraj Avatar asked Feb 13 '26 18:02

Suraj


1 Answers

You need to have PostgreSQL libraries and build essentials installed to compile the native extension of PG.

For PostgreSQL libraries

sudo apt-get install libpq-dev

For Build essentials

sudo apt-get install build-essential 

Assuming you are on an ubuntu machine

like image 131
coderhs Avatar answered Feb 15 '26 07:02

coderhs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!