0

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

1 Answer 1

2

Assuming you are familiar with rails and got it installed properly, you need to use macports to install postgre's driver, before you can use any gem for it.

There are instructions here, or (more recent, uses brew) here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.