maxlapshin / mysql2postgres

Mysqldump, writing in postgresql format
MIT License
711 stars 156 forks source link

trouble with creating postgres gem #6

Closed mdotmoment11 closed 14 years ago

mdotmoment11 commented 14 years ago

I first ran into the issue here:

http://rubyforge.org/tracker/index.php?func=detail&aid=26744&group_id=3214&atid=12396

wherein with ruby > 1.9 you can't create a postgres gem.

Unfortunately, I can't seem to create a pg gem either. I keep getting:

[brad@hpemysql01 pg]$ sudo gem install pg Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb ERROR: can't find pg_config. HINT: Make sure pg_config is in your PATH * 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.

But I know that pg_config is in my path: PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/brad/bin:/home/brad/bin:/home/brad/bin:/usr/local/lib/ruby/1.9.1:/home/brad/bin:/usr/local/lib/ruby/1.9.1:/usr/local/pgsql/bin

it is in the /usr/local/pgsql/bin dir. not sure what i'm missing?

mdotmoment11 commented 14 years ago

Doh!!

The problem was that the root user didn't have postgres stuff in its path. I added it and was able to create a pg gem.