I require a native extension, that is in my filesystem but not compatible with my current system. In this case I want to react in ruby and use a mock implementation, but this code
puts "Got LoadError"
puts "Warning: could not open dotstar native support => using sim"
Looks like this is a duplicate of: How do I rescue from a `require': no such file to load in ruby?
You have to specifically