Forum: Ruby on Rails Problem with installing gems

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Elton Yau (Guest)
on 2014-03-15 09:20
(Received via mailing list)
Hey Guys, so i recently started playing around with ROR, however
whenever i
try to install gems i get this message

ERROR:  Error installing pg:
ERROR: Failed to build gem native extension.

        /Applications/rubystack-1.9.3-22/ruby/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from
*** 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:
`try_do': The compiler failed to generate an executable file.
You have to install development tools first.
from /Applications/rubystack-1.9.3-22/ruby/lib/ruby/1.9.1/mkmf.rb:461:in
from /Applications/rubystack-1.9.3-22/ruby/lib/ruby/1.9.1/mkmf.rb:476:in
from extconf.rb:39:in `<main>'

Gem files will remain installed in
for inspection.
Results logged to

I dont really get whats happening ...

Thanks !

Frederick Cheung (Guest)
on 2014-03-15 14:09
(Received via mailing list)
On Saturday, March 15, 2014 6:35:18 AM UTC, Elton Yau wrote:
> Using config values from

You need development tools installed (c compiler etc). Assuming you're
on OS X this means installing Xcode and from within Xcode installing the
command line tools (on mavericks you run xcode-select --install )

This topic is locked and can not be replied to.