I inherited a Ruby on Rails project. It was delivered all zipped up so as a first step, I want to get it running on my desktop Mac:
script/server
=> Booting WEBrick...
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:74:in establish_connection': Please install the postgresql adapter:
gem install activerecord-postgresql-adapter` (no such file to load -- pg) (RuntimeError)
So, I try to install the activerecord-postgresql-adapter gem and then get this:
$ sudo gem install activerecord-postgresql-adapter
Password:
Building native extensions. This could take a while...
ERROR: Error installing activerecord-postgresql-adapter:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/pg-0.14.1 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/pg-0.14.1/ext/gem_make.out
How can I get this required gem installed?
Thanks