I'm not picking on postgres-pr, but I will use it as an example. Below the current implementation of postgres.rb is shown.
beginThe above implementation works when installed; however, when unpacked and uninstalled it raises the following error.
MissingSourceFile: no such file to load Â postgres-pr/postgres-compatTo fix this issue you can manually change all the require statements to use absolute paths or you can add the directory where the gem is unpacked to the load path. I'm not a big fan of making changes to an unpacked gem since I will lose my changes when a new gem version comes out; therefore, adding another directory to the load path seems to be the lesser of two evils. Adding a directory to the load path in Ruby is easy enough.
$:.unshift [path]But, I really don't think this should be necessary. Instead RubyGem developers should make the effort to use absolute paths.
require File.dirname(__FILE__) + [relative path]