I using Bamboo with my ruby on rails app (Raisl 5 and ruby 2.3.3)
Bamboo does a 'build' of the app and runs the rpsec tests. However, Bamboo fails when doing a gem install as it cannot seem to install postgres gem.
Here is the output from Bamboo:
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
checking for pg_config... yes
Using config values from /bin/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
To see why this extension failed to compile, please check the mkmf.log which can be found here:
extconf failed, exit code 1
How can I fix this?
The error you're getting shows that it can't find the 'libpq-fe.h header. I would take a look at the StackOverflow article Can't find the 'libpq-fe.h header when trying to install pg gem or perhaps this Github page for more information on how to resolve this issue.
If neither of those resources help let me know what steps you tried and we'll go from there.
Thanks for the reply.
The stackoverflow link you posted was my first port of call.
I added a bamboo bash script task and tried:
sudo apt-get install libpq-dev
but it gave me a tty error, it also would not work without sudo. I'm not sure how to get it working with or without sudo, is that possible?
(I also tried using yum).
Do you know how I can get this to work in a Bamboo script task (before the bundle install)?
I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events