From: James Masters Date: 2011-08-11T15:56:50+09:00 Subject: Supporting both ruby 1.8 and 1.9 in a compiled library Hi all, I am a maintainer of the Ruby interface to a C++ library wrapped using SWIG. Up until now I have only supported Ruby 1.8 but I'm now adding support for Ruby 1.9. Are there any recommendations for how to allow both compiled copies of this wrapped library to be on the load path ($RUBYLIB) given that the *.so files are different for 1.8 and 1.9? (Some of my users will use 1.8 and others will use 1.9 but $RUBYLIB is shared). I was thinking of my own solution similar to (module is "oa"): oa.rb oa/1.8/x86_64-linux/*.so oa/1.9/x86_64-linux/*.so And the oa.rb file will have custom code written to dispatch to one set of the *.so files based on the Ruby version. Are there any better ways? Sorry if this is a basic question... I could not find the answer by doing some Internet searches. I'd prefer to not use gems for this since I will not distribute it online and Ruby 1.8 is not guaranteed to have rubygems installed (trying to keep this as flexible and simple as possible). Thanks in advance... -James -- Posted via http://www.ruby-forum.com/.