Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

pg-0.14.0 Install error

I'm on the Profile Controller lesson, and am having problems installing a gem.

Entered this into the console: rails generate controller profiles show

And got this: Could not find pg-0.14.0 in any of the sources Run bundle install to install missing gems.

Ran 'bundle install' and got: Installing pg (0.14.0) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb checking for pg_config... yes Using config values from /usr/bin/pg_config checking for libpq-fe.h... yes An error occurred while installing pg (0.14.0), and Bundler cannot continue. Make sure that gem install pg -v '0.14.0' succeeds before bundling.

Ran `gem install pg -v '0.14.0' and got another error.

1 Answer

Found a workable solution over at StackExchange: http://stackoverflow.com/questions/11439207/rails-error-installing-pg-gem

Also, make sure that your $PATH is set correctly.