We use a bunch of thrift files, some including others. The ones that have constants.rb files require the related _types.rb file using "File.dirname(FILE_) + '/whatever_types.rb'", which is designed to help the constants file find the types file. However, since none of the other requires in the project use File.dirname to qualify the requires, we end up reloading some files more than once. This results in us reloading those constants, which in turn generates a whole big bunch of Ruby warnings (in our case over 100).
Since the designated way to require thrift types is to put all the generated files in the load path and then load the files by name, I think that we should remove the File.dirname stuff and rely fully on the load path.