Question

I compiled pg gem with postgres 8.4 sources, but I have reinstalled postgres to 9.0. I have reinstalled pg, but I'm not sure if native extensions were reinstalled. How do I check this?

Was it helpful?

Solution

You did not provide any context like your OS and how are you managing your gems. Usually the native extension will be built when installing the gem, therefore the gem installation would have failed if the building of the native extension did not succeed.

Assuming you are using rvm and ruby-1.8.7-p352 version of ruby, look for the compiled extension:

$HOME/.rvm/gems/ruby-1.8.7-p352/gems/pg-0.11.0/lib/pg_ext.so

Note that .so is the extension on Linux. To check what is on your OS do:

ruby -e "require 'rbconfig'; puts RbConfig::CONFIG['DLEXT']"

If you did not use rvm, in Linux you can find system ruby and its gems in a path like this one (may be different in your distro)

/usr/lib64/ruby/gems/1.8/gems
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top